Class HtmlContentCleaner
java.lang.Object
org.apache.tika.ml.junkdetect.HtmlContentCleaner
Junk-detection HTML→text cleaning: strip tags, then expand entities
to codepoints. Called by both
TrainJunkModel and JunkFilterEncodingDetector so training and inference prepare text identically
(no drift).
Unlike charset detection's HtmlByteStripper.stripTagsAndEntities(byte[], int, int, byte[], int)
(which drops entities as charset-neutral ASCII noise), junk detection
expands them: the resulting codepoints — cross-script under a wrong decoding —
are what expose mojibake.
-
Method Summary
-
Method Details
-
clean
-