<commit_before>$(window).ready(
    function () {
        $("#json-input").linedtextarea();

        $("#json-input").bind('paste', function() {
            // Need a timeout since paste event does not give the content
            // of the clipboard.
            setTimeout(function(){
                validate_job_data($("#json-input").val());
            },100);
        });

        $("#json-input").blur(function() {
            validate_job_data($("#json-input").val());
        });
    });

validate_job_data = function() {
    $.post(window.location.pathname,
           {"json-input": json_input,
            "csrfmiddlewaretoken": $("[name='csrfmiddlewaretoken']").val()},
           function(data) {

           });
}<commit_msg>Add better definition for validate function.<commit_after>$(window).ready(
    function () {
        $("#json-input").linedtextarea();

        $("#json-input").bind('paste', function() {
            // Need a timeout since paste event does not give the content
            // of the clipboard.
            setTimeout(function(){
                validate_job_data($("#json-input").val());
            },100);
        });

        $("#json-input").blur(function() {
            validate_job_data($("#json-input").val());
        });
    });

validate_job_data = function(json_input) {
    $.post(window.location.pathname,
           {"json-input": json_input,
            "csrfmiddlewaretoken": $("[name='csrfmiddlewaretoken']").val()},
           function(data) {

           });
}
{'fraction_non_alphanumeric': 0.18211702827087442, 'fraction_numerical': 0.0039447731755424065, 'mean_word_length': 2.0872210953346855, 'pattern_counts': {'":': 4, '<': 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': '1888474', 'n_tokens_mistral': 418, 'n_tokens_neox': 408, 'n_words': 69}