lib/natural/classifiers/classifier.js
function(docs) {
        setTimeout(function() {
            self.events.emit('processedBatch', {
                size: docs.length,
                docs: totalDocs,
                batches: numThreads,
                index: finished
            });
        });

        for (var j = 0; j < docs.length; j++) {
            docFeatures[docs[j].index] = docs[j].features;
        }
    }
function(docs) {
        setTimeout(function() {
            self.events.emit('processedBatch', {
                size: docs.length,
                docs: totalDocs,
                batches: numThreads,
                index: finished
            });
        });

        for (var j = 0; j < docs.length; j++) {
            docFeatures[docs[j].index] = docs[j].features;
        }
    }
function ( docs ) { setTimeout ( function ( ) { self . events . emit ( 'processedBatch' , { size : docs . length , docs : totalDocs , batches : numThreads , index : finished } ) ; } ) ; for ( var j = 0 ; j < docs . length ; j ++ ) { docFeatures [ docs [ j ] . index ] = docs [ j ] . features ; } }
Called when a batch completes processing
Called when a batch completes processing