public final class IgnoreBlocksAfterContentFromEndFilter extends java.lang.Object implements BoilerpipeFilter
DefaultLabels.INDICATES_END_OF_TEXT
, and after any content block.
This filter can be used in conjunction with an upstream TerminatingBlocksFinder
.TerminatingBlocksFinder
Modifier and Type | Field and Description |
---|---|
static IgnoreBlocksAfterContentFromEndFilter |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
protected static int |
getNumFullTextWords(TextBlock tb) |
protected static int |
getNumFullTextWords(TextBlock tb,
float minTextDensity) |
boolean |
process(TextDocument doc)
Processes the given document
doc . |
public static final IgnoreBlocksAfterContentFromEndFilter INSTANCE
public boolean process(TextDocument doc) throws BoilerpipeProcessingException
BoilerpipeFilter
doc
.process
in interface BoilerpipeFilter
doc
- The TextDocument
that is to be processed.true
if changes have been made to the
TextDocument
.BoilerpipeProcessingException
protected static int getNumFullTextWords(TextBlock tb)
protected static int getNumFullTextWords(TextBlock tb, float minTextDensity)