<commit_before>'use strict';
(function() {

    klp.init = function() {
        klp.router = new KLPRouter();
        klp.router.init();
        klp.router.start();
        loadData();
    }

    function loadData() {
        // var params = {};
        // var dataURL = "/stories/?source=mobile";
        // var $dataXHR = klp.api.do(dataURL, params);
        // $dataXHR.done(function(data) {
        //     renderSummary(data);
        // });
        $.get( "http://dev.klp.org.in/api/v1/stories/?source=mobile", function( data ) {
            renderSummary(data);
            alert( "Load was performed." );
        });
    }
    
    function renderSummary(data) {
        var tplCountSummary = swig.compile($('#tpl-countSummary').html());
        var tplResponseTable = swig.compile($('#tpl-responseTable').html());
        var countHTML = tplCountSummary(data);
        var tableHTML = tplResponseTable(data);
        $('#count_response').html(countHTML);
        $('#response_dummary').html(tableHTML);
    }   

})();<commit_msg>Fixed the swig object names<commit_after>'use strict';
(function() {

    klp.init = function() {
        klp.router = new KLPRouter();
        klp.router.init();
        klp.router.start();
        loadData();
    }

    function loadData() {
        var params = {};
        var dataURL = "/stories/?source=mobile";
        var $dataXHR = klp.api.do(dataURL, params);
        $dataXHR.done(function(data) {
            renderSummary(data);
        });
        // $.get( "http://dev.klp.org.in/api/v1/stories/?source=mobile", function( data ) {
        //     renderSummary(data);
        //     alert( "Load was performed." );
        // });
    }
    
    function renderSummary(data) {
        var tplCountSummary = swig.compile($('#tpl-countSummary').html());
        var tplResponseTable = swig.compile($('#tpl-responseTable').html());
        var countHTML = tplCountSummary(data);
        var tableHTML = tplResponseTable(data);
        $('#count_response').html(countHTML);
        $('#response_dummary').html(tableHTML);
    }   

})();
{'fraction_non_alphanumeric': 0.1727447216890595, 'fraction_numerical': 0.0009596928982725527, 'mean_word_length': 2.1929555895865236, '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': '2115671', 'n_tokens_mistral': 639, 'n_tokens_neox': 636, 'n_words': 102}