<commit_before>"use strict";

angular.module(
  'arethusa', [
    'mm.foundation',
    'ngRoute',
    'arethusa.core',
    'arethusa.morph',
    'arethusa.hist'
  ],
  function($routeProvider) {
    $routeProvider.when('/', {
      controller: 'MainCtrl',
      templateUrl: 'templates/main2.html',
      resolve: {
        loadConfiguration: function($q, $http, $route, configurator) {
          console.log($route.current.params.conf);
          return $http({
            method: 'GET',
            url: $route.current.params.conf
          }).then(function(result) {
            configurator.configuration = result.data;
          });
        }
      }
    }
  );
});
<commit_msg>Fall back to a default conf file if needed<commit_after>"use strict";

angular.module(
  'arethusa', [
    'mm.foundation',
    'ngRoute',
    'arethusa.core',
    'arethusa.morph',
    'arethusa.hist'
  ],
  function($routeProvider) {
    $routeProvider.when('/', {
      controller: 'MainCtrl',
      templateUrl: 'templates/main2.html',
      resolve: {
        loadConfiguration: function($q, $http, $route, configurator) {
          console.log($route.current.params.conf);
          return $http({
            method: 'GET',
            url: $route.current.params.conf || './static/configuration_default.json'
          }).then(function(result) {
            configurator.configuration = result.data;
          });
        }
      }
    }
  );
});

{'fraction_non_alphanumeric': 0.15577190542420027, 'fraction_numerical': 0.0013908205841446453, 'mean_word_length': 2.2048997772828507, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4288368', 'n_tokens_mistral': 445, 'n_tokens_neox': 436, 'n_words': 71}