Class ReplacementCharCounter
java.lang.Object
org.apache.tika.eval.core.textstats.ReplacementCharCounter
- All Implemented Interfaces:
StringStatsCalculator<Integer>, TextStatsCalculator
Counts U+FFFD (REPLACEMENT CHARACTER) occurrences in the extracted text.
A high replacement-char count signals a decode failure — the charset used to decode the bytes couldn't map them, producing U+FFFD. Unlike OOV, this is a structural correctness signal that does not depend on the per-language vocabulary, so it does not mis-rank CJK decodes (real CJK is OOV-heavy but has zero U+FFFD; mojibake under the wrong charset has many).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ReplacementCharCounter
public ReplacementCharCounter()
-
-
Method Details
-
calculate
- Specified by:
calculatein interfaceStringStatsCalculator<Integer>
-