Class NaiveBayesBigramEncodingDetector.ScoreResult
java.lang.Object
org.apache.tika.ml.chardetect.NaiveBayesBigramEncodingDetector.ScoreResult
- Enclosing class:
NaiveBayesBigramEncodingDetector
Score result returned by
NaiveBayesBigramEncodingDetector.scoreClassesAndCount(byte[]).
Exposes the raw per-class score vector together with the number
of bigrams that actually contributed to the dot product (i.e.,
bigrams with non-zero IDF and not skipped by the whitespace-pair
rule) and the total bigrams in the scored region of the probe.
scoredBigrams is the unit of "evidence available to NB"
— robust to HTML / whitespace noise in the input because those
bigrams have IDF == 0 and don't contribute.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intfinal double[]final int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
scores
public final double[] scores -
scoredBigrams
public final int scoredBigrams -
totalBigrams
public final int totalBigrams
-
-
Constructor Details
-
ScoreResult
public ScoreResult(double[] scores, int scoredBigrams, int totalBigrams)
-