<commit_before>angular.module('myApp.services', [])
    .factory('wikiSvc', ['$http', function ($http) {
        'use strict';

        return {
            query: function (search) {
                var promise = $http({
                    method: 'GET',
                    url: 'https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=' + search,
                    cache: true
                });
                promise.success(function (data, status, headers, conf) {
                    return data;
                });
                return promise;
            }
        };
    }]);<commit_msg>fixed service to use jsonp<commit_after>angular.module('myApp.services', [])
    .factory('wikiSvc', ['$http', function ($http) {
        'use strict';

        return {
            query: function (search) {
                var promise = $http({
                    method: 'JSONP',
                    url: 'https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=' + search + '&callback=JSON_CALLBACK',
                    cache: true
                });
                promise.success(function (data, status, headers, conf) {
                    return data;
                });
                return promise;
            }
        };
    }]);
{'fraction_non_alphanumeric': 0.13597918022121014, 'fraction_numerical': 0.00520494469746259, 'mean_word_length': 1.8220183486238533, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3897317', 'n_tokens_mistral': 442, 'n_tokens_neox': 419, 'n_words': 65}