<commit_before>import URLBuilder from './URLBuilder.js';
import {makeErrorObject} from './Errors.js';

const STATUS_MESSAGES = {
    'NEW': 'Your predictions have been queued for processing.',
    'RUNNING': 'Your predictions are running.',
    'COMPLETE': 'Your predictions are ready.',
    'ERROR': 'Error:'
};

//onSearchData(predictions, pageNum, hasNextPages, warning)

class CustomResultSearch {
    constructor(statusLabelObj, pageBatch) {
        this.urlBuilder = new URLBuilder($.ajax);
        this.resultIdCache = new ResultIdCache();
        this.currentRequest = {};
        this.statusLabelObj = statusLabelObj;
        this.setStatusLabel = this.setStatusLabel.bind(this);
        this.log = console.log;
        this.active = true;
        this.currentJobId = 0;
        this.pageBatch = pageBatch;
        this.lastResultId = undefined;
    }

    cancel() {
        this.active = false;
    }
<commit_msg>safari will not let you store console.log in a function<commit_after>import URLBuilder from './URLBuilder.js';
import {makeErrorObject} from './Errors.js';

const STATUS_MESSAGES = {
    'NEW': 'Your predictions have been queued for processing.',
    'RUNNING': 'Your predictions are running.',
    'COMPLETE': 'Your predictions are ready.',
    'ERROR': 'Error:'
};

//onSearchData(predictions, pageNum, hasNextPages, warning)

class CustomResultSearch {
    constructor(statusLabelObj, pageBatch) {
        this.urlBuilder = new URLBuilder($.ajax);
        this.resultIdCache = new ResultIdCache();
        this.currentRequest = {};
        this.statusLabelObj = statusLabelObj;
        this.setStatusLabel = this.setStatusLabel.bind(this);
        this.log = (str) => (console.log(str));
        this.active = true;
        this.currentJobId = 0;
        this.pageBatch = pageBatch;
        this.lastResultId = undefined;
    }

    cancel() {
        this.active = false;
    }

{'fraction_non_alphanumeric': 0.12119622245540398, 'fraction_numerical': 0.001049317943336831, 'mean_word_length': 2.9979035639413, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1768307', 'n_tokens_mistral': 549, 'n_tokens_neox': 546, 'n_words': 134}