<commit_before>angular.module('main').controller('ExampleCtrl', ['$scope', '$route', '$http', '$location', '$backend',
 function($scope, $route, $http, $location, $backend) {

  $scope.examples = [ 
      { 
        name: "TotalAssets",
        description: "Total Assets Grouped By Fiscal Period",
        file: 'api/TotalForConceptGroupedByFiscalPeriodForAllEntities.jq', 
        params: { concept: "us-gaap:Assets", period: "FY" } 
      },
      { 
        name: "TotalLiabilitiesAndEquity",
        description: "Total Liabilities And Equity Grouped By Fiscal Period",
        file: 'api/TotalForConceptGroupedByFiscalPeriodForAllEntities.jq',
        params: { concept: "fac:LiabilitiesAndEquity", period: "FY", map: "FundamentalAccountingConcepts" }
      }
   ];

  $scope.getExample = function(ex) {
    $scope.data=null;
    $scope.params = {};
    angular.extend($scope.params, ex.params, $location.search(), { "_method" : "POST", "token" : $scope.token, "format": "json", "$refresh": true });
    $scope.example = ex;

    $http(
      {
        method : 'GET',
        url: $backend.API_URL + '/_queries/public/' + ex.file,
        params : $scope.params,
      }).
      success(function(data, status, headers, config) {
        $scope.data = data;
        $scope.safeApply();
      }).
      error(function(data, status, headers, config) {
        $scope.$emit("error", status, data);
      });
  };

  $scope.trimURL = function(url) {
    if (url.length < 40) return url;

    return url.substr(0, 10) + "..." + url.substr(url.length - 30);
  };
  
  $scope.trim = function(item) {
    return angular.copy(item).splice(4, item.length - 5);
  };
  
  $scope.clear = function(item) {
    return item.replace("iso4217:", "").replace("xbrli:", "");<commit_msg>improved explanation of examples<commit_after>angular.module('main').controller('ExampleCtrl', ['$scope', '$route', '$http', '$location', '$backend',
 function($scope, $route, $http, $location, $backend) {

  $scope.examples = [ 
      { 
        name: "TotalAssets",
        description: "Total Assets of all 10-Ks grouped by fiscal period and fiscal year.",
        file: 'api/TotalForConceptGroupedByFiscalPeriodForAllEntities.jq', 
        params: { concept: "us-gaap:Assets", fiscalPeriod: "FY" } 
      },
      { 
        name: "TotalLiabilitiesAndEquity",
        description: "Total liabilities and equity of all 10-Ks grouped by fiscal period and fiscal year. The selection of the concept is done using a concept named fac:LiabilitiesAndEquity which is defined in the concept map called FundamentalAccountingConcepts.",
        file: 'api/TotalForConceptGroupedByFiscalPeriodForAllEntities.jq',
        params: { concept: "fac:LiabilitiesAndEquity", fiscalPeriod: "FY", map: "FundamentalAccountingConcepts" }
      }
   ];

  $scope.getExample = function(ex) {
    $scope.data=null;
    $scope.params = {};
    angular.extend($scope.params, ex.params, $location.search(), { "_method" : "POST", "token" : $scope.token, "format": "json" });
    $scope.example = ex;

    $http(
      {
        method : 'GET',
        url: $backend.API_URL + '/_queries/public/' + ex.file,
        params : $scope.params,
      }).
      success(function(data, status, headers, config) {
        $scope.data = data;
        $scope.safeApply();
      }).
      error(function(data, status, headers, config) {
        $scope.$emit("error", status, data);
      });
  };

  $scope.trimURL = function(url) {
    if (url.length < 40) return url;

    return url.substr(0, 10) + "..." + url.substr(url.length - 30);
  };
  
  $scope.trim = function(item) {
    return angular.copy(item).splice(4, item.length - 5);
  };
  
  $scope.clear = function(item) {
    return item.replace("iso4217:", "").replace("xbrli:", "");
{'fraction_non_alphanumeric': 0.16441620333598095, 'fraction_numerical': 0.007942811755361398, 'mean_word_length': 3.044967880085653, 'pattern_counts': {'":': 3, '<': 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': '89339', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1178, 'n_words': 256}