dist/multilabel/BinarySegmentation.js
function(segment, explain) {
		var classes = this.classifySegment(segment, explain);
		if (classes.classes.length==0) {
			// FEATURES
			return ['', 0, ''];
			// return ['', 0];
		} else {
			// HERE
			// console.log([classes.classes[0], classes.scores[classes.classes[0]]])
			// FEATURES
			return [classes.classes[0], classes.scores[classes.classes[0]], classes['explanation']['positive']];
			// return [classes.classes[0], classes.scores[classes.classes[0]]];
		}
	}
function(segment, explain) {
		var classes = this.classifySegment(segment, explain);
		if (classes.classes.length==0) {
			// FEATURES
			return ['', 0, ''];
			// return ['', 0];
		} else {
			// HERE
			// console.log([classes.classes[0], classes.scores[classes.classes[0]]])
			// FEATURES
			return [classes.classes[0], classes.scores[classes.classes[0]], classes['explanation']['positive']];
			// return [classes.classes[0], classes.scores[classes.classes[0]]];
		}
	}
Internal function - use the model trained so far to classify a single segment of a sentence.

@param segment a part of a text sentence.
@param explain - int - if positive, an "explanation" field, with the given length, will be added to the result.

@return an array [the_best_class, and_its_probability].