<commit_before>angular.module('magna-app')

.provider('MMLService', [function() {

  this.$get = ['$http',
    function($http) {
      var MMLServiceInstance = function() {
        this.mml = undefined;
        this.styles = undefined;
      };

      MMLServiceInstance.prototype.load = function(mml) {
        var self = this;
        var loadPromise = $http.get(mml);
        // TODO add on error
        loadPromise.success(function(data) {
          self.styles = data.Stylesheet;
        });
        return loadPromise;
      };

      return new MMLServiceInstance();
  }];
}]);
<commit_msg>Added function to get loaded promise<commit_after>angular.module('magna-app')

.provider('MMLService', [function() {

  this.$get = ['$http',
    function($http) {
      var MMLServiceInstance = function() {
        this.mml = undefined;
        this.styles = undefined;
      };

      MMLServiceInstance.prototype.load = function(mml) {
        var self = this;
        self.loadPromise = $http.get(mml);
        // TODO add on error
        self.loadPromise.success(function(data) {
          self.styles = data.Stylesheet;
        });
        return self.loadPromise;
      };

      MMLServiceInstance.prototype.loaded = function() {
        var self = this;
        return self.loadPromise;
      };

      return new MMLServiceInstance();
  }];
}]);

{'fraction_non_alphanumeric': 0.13357933579335793, 'fraction_numerical': 0.0, 'mean_word_length': 2.2674698795180723, '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': '5597417', 'n_tokens_mistral': 400, 'n_tokens_neox': 394, 'n_words': 77}