<commit_before>'use strict';

angular.module('ngGPlaces', []);
angular.module('ngGPlaces').value('gPlaces', google.maps.places);
angular.module('ngGPlaces').value('gMaps', google.maps);

angular.module('ngGPlaces').
provider('ngGPlacesAPI', function () {

    var defaults = {
        radius: 1000,
        sensor: false,
        latitude: null,
        longitude: null,
        // types: ['lodging'],
        map: null,
        elem: null,
        textSearchKeys: ['formatted_address','geometry','id','name','place_id','price_level','rating','reference','types'],
        nearbySearchKeys: ['geometry','id','name','place_id','rating','reference','types'],
        placeDetailsKeys: ['formatted_address','formatted_phone_number','geometry','html_attributions','icon','id','international_phone_number','name','opening_hours','photos','place_id','price_level','rating','reference','reviews','types', 'vicinity','website'],
        radarSearchKeys: ['geometry', 'place_id'],
        nearbySearchErr: 'Unable to find nearby places',
        placeDetailsErr: 'Unable to find place details',
        radarSearchErr: 'Unable to find search details',
        textSearchErr: 'Unable to find text details',
        _textSearchApiFnCall: 'textSearch',
        _nearbySearchApiFnCall: 'nearbySearch',
        _placeDetailsApiFnCall: 'getDetails',
        _radarSearchApiFnCall: 'radarsearch'
    };

    var parseNSJSON = function (response) {
        var pResp = [];
        var keys = defaults.nearbySearchKeys;
        response.map(function (result) {
            var obj = {};
            angular.forEach(keys, function (k) {
                obj[k] = result[k];
            });
            pResp.push(obj);
        });
        return pResp;
    };

    var parseTSJSON = function (response) {
        var pResp = [];
        var keys = defaults.textSearchKeys;
        response.map(function (result) {
            var obj = {};
            angular.forEach(keys, function (k) {
                obj[k] = result[k];
            });
            pResp.push(obj);
        });
        return pResp;
    };

    var parseRSJSON = function (response) {
        var pResp = [];
        var keys = defaults.radarSearchKeys;<commit_msg>another attempt at getting radar search to work<commit_after>'use strict';

angular.module('ngGPlaces', []);
angular.module('ngGPlaces').value('gPlaces', google.maps.places);
angular.module('ngGPlaces').value('gMaps', google.maps);

angular.module('ngGPlaces').
provider('ngGPlacesAPI', function () {

    var defaults = {
        radius: 1000,
        sensor: false,
        latitude: null,
        longitude: null,
        // types: ['lodging'],
        map: null,
        elem: null,
        textSearchKeys: ['formatted_address','geometry','id','name','place_id','price_level','rating','reference','types'],
        nearbySearchKeys: ['geometry','id','name','place_id','rating','reference','types'],
        placeDetailsKeys: ['formatted_address','formatted_phone_number','geometry','html_attributions','icon','id','international_phone_number','name','opening_hours','photos','place_id','price_level','rating','reference','reviews','types', 'vicinity','website'],
        radarSearchKeys: ['geometry', 'place_id'],
        nearbySearchErr: 'Unable to find nearby places',
        placeDetailsErr: 'Unable to find place details',
        radarSearchErr: 'Unable to find search details',
        textSearchErr: 'Unable to find text details',
        _textSearchApiFnCall: 'textSearch',
        _nearbySearchApiFnCall: 'nearbySearch',
        _placeDetailsApiFnCall: 'getDetails',
        _radarSearchApiFnCall: 'radarSearch'
    };

    var parseNSJSON = function (response) {
        var pResp = [];
        var keys = defaults.nearbySearchKeys;
        response.map(function (result) {
            var obj = {};
            angular.forEach(keys, function (k) {
                obj[k] = result[k];
            });
            pResp.push(obj);
        });
        return pResp;
    };

    var parseTSJSON = function (response) {
        var pResp = [];
        var keys = defaults.textSearchKeys;
        response.map(function (result) {
            var obj = {};
            angular.forEach(keys, function (k) {
                obj[k] = result[k];
            });
            pResp.push(obj);
        });
        return pResp;
    };

    var parseRSJSON = function (response) {
        var pResp = [];
        var keys = defaults.radarSearchKeys;
{'fraction_non_alphanumeric': 0.14823107926556203, 'fraction_numerical': 0.0017913121361397223, 'mean_word_length': 2.779187817258883, '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': '3603734', 'n_tokens_mistral': 1289, 'n_tokens_neox': 1236, 'n_words': 244}