<commit_before>angular.module('scraper.ctrl', ['services.server'])


.controller('ScraperController', [ '$scope', 'Server', function($scope, Server){
  $scope.urlToScrape = '';
  $scope.displayUrl = '';
  $scope.scrape = {};


  $scope.checkAndSubmit = function() {
    var url = $scope.urlToScrape;
    if (url.length < 4) return;
    if (url.substring(0, 4) !== 'http') url = 'http://' + url;

    $scope.displayUrl = url;

    Server.scrape(url)
    .then(function (data) {
      $scope.scrape = data;
    });
  };

}]);<commit_msg>(fix) Make scraper test clear out old data after fetching new data<commit_after>angular.module('scraper.ctrl', ['services.server'])


.controller('ScraperController', [ '$scope', 'Server', function($scope, Server){
  $scope.urlToScrape = '';
  $scope.displayUrl = '';
  $scope.scrape = {};


  $scope.checkAndSubmit = function() {
    var url = $scope.urlToScrape;
    if (url.length < 4) return;
    if (url.substring(0, 4) !== 'http') url = 'http://' + url;

    $scope.displayUrl = url;

    Server.scrape(url)
    .then(function (data) {
      $scope.scrape = {};
      $scope.scrape = data;
    });
  };

}]);
{'fraction_non_alphanumeric': 0.19843342036553524, 'fraction_numerical': 0.005221932114882507, 'mean_word_length': 3.3893129770992365, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '96992', 'n_tokens_mistral': 421, 'n_tokens_neox': 395, 'n_words': 78}