Class LabelFusion
- java.lang.Object
-
- de.l3s.boilerpipe.filters.heuristics.LabelFusion
-
- All Implemented Interfaces:
BoilerpipeFilter
public final class LabelFusion extends java.lang.Object implements BoilerpipeFilter
Fuses adjacent blocks if their labels are equal.
-
-
Field Summary
Fields Modifier and Type Field Description static LabelFusionINSTANCE
-
Constructor Summary
Constructors Constructor Description LabelFusion(java.lang.String labelPrefix)Creates a newLabelFusioninstance.
-
Method Summary
Modifier and Type Method Description booleanprocess(TextDocument doc)Processes the given documentdoc.
-
-
-
Field Detail
-
INSTANCE
public static final LabelFusion INSTANCE
-
-
Constructor Detail
-
LabelFusion
public LabelFusion(java.lang.String labelPrefix)
Creates a newLabelFusioninstance.- Parameters:
maxBlocksDistance- The maximum distance in blocks.contentOnly-
-
-
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
-
-