<commit_before>
// Initialise OCRJS namespace
if (OCRJS === undefined) {
    var OCRJS = {};
}


OCRJS.OcrBase = Base.extend({
    constructor: function(options) {
        this.options = {
            log: false,
        }
        $.extend(this.options, options);        
    },

    _logger: function(text) {
        if (!this.options.log)
            return;            
        var log = $("#logwin");
        if (!log.length) {
            log = $("<span></span>").attr("id", "logwin");
            $("body").append(log);
        }
        log.text((new Date()).getTime() + ":   " + text);
    },             
});


// Base widget for OCR items.  Just provides
// logging window facilities
OCRJS.OcrBaseWidget = OCRJS.OcrBase.extend({
    constructor: function(parent, options) {
        this.base(options);
        this.parent = parent;
        this.options = {
            log: false,
        }
        $.extend(this.options, options);        
    },

    containerWidget: function() {
        $(this.parent).closest(".widget");    
    },
});<commit_msg>Actually return something from this hacky function<commit_after>
// Initialise OCRJS namespace
if (OCRJS === undefined) {
    var OCRJS = {};
}


OCRJS.OcrBase = Base.extend({
    constructor: function(options) {
        this.options = {
            log: false,
        }
        $.extend(this.options, options);        
    },

    _logger: function(text) {
        if (!this.options.log)
            return;            
        var log = $("#logwin");
        if (!log.length) {
            log = $("<span></span>").attr("id", "logwin");
            $("body").append(log);
        }
        log.text((new Date()).getTime() + ":   " + text);
    },             
});


// Base widget for OCR items.  Just provides
// logging window facilities
OCRJS.OcrBaseWidget = OCRJS.OcrBase.extend({
    constructor: function(parent, options) {
        this.base(options);
        this.parent = parent;
        this.options = {
            log: false,
        }
        $.extend(this.options, options);        
    },

    containerWidget: function() {
        return $(this.parent).closest(".widget");    
    },
});
{'fraction_non_alphanumeric': 0.15881809787626963, 'fraction_numerical': 0.0, 'mean_word_length': 1.7640306122448979, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, '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': '4079704', 'n_tokens_mistral': 642, 'n_tokens_neox': 632, 'n_words': 129}