Class IgnoreBlocksAfterContentFromEndFilter
- java.lang.Object
-
- de.l3s.boilerpipe.filters.english.IgnoreBlocksAfterContentFromEndFilter
-
- All Implemented Interfaces:
BoilerpipeFilter
public final class IgnoreBlocksAfterContentFromEndFilter extends java.lang.Object implements BoilerpipeFilter
Marks all blocks as "non-content" that occur after blocks that have been markedDefaultLabels.INDICATES_END_OF_TEXT, and after any content block. This filter can be used in conjunction with an upstreamTerminatingBlocksFinder.- See Also:
TerminatingBlocksFinder
-
-
Field Summary
Fields Modifier and Type Field Description static IgnoreBlocksAfterContentFromEndFilterINSTANCE
-
Method Summary
Modifier and Type Method Description protected static intgetNumFullTextWords(TextBlock tb)protected static intgetNumFullTextWords(TextBlock tb, float minTextDensity)booleanprocess(TextDocument doc)Processes the given documentdoc.
-
-
-
Field Detail
-
INSTANCE
public static final IgnoreBlocksAfterContentFromEndFilter INSTANCE
-
-
Method Detail
-
process
public boolean process(TextDocument doc) throws BoilerpipeProcessingException
Description copied from interface:BoilerpipeFilterProcesses the given documentdoc.- Specified by:
processin interfaceBoilerpipeFilter- Parameters:
doc- TheTextDocumentthat is to be processed.- Returns:
trueif changes have been made to theTextDocument.- Throws:
BoilerpipeProcessingException
-
getNumFullTextWords
protected static int getNumFullTextWords(TextBlock tb)
-
getNumFullTextWords
protected static int getNumFullTextWords(TextBlock tb, float minTextDensity)
-
-