Class AddPrecedingLabelsFilter
- java.lang.Object
-
- de.l3s.boilerpipe.filters.heuristics.AddPrecedingLabelsFilter
-
- All Implemented Interfaces:
BoilerpipeFilter
public final class AddPrecedingLabelsFilter extends java.lang.Object implements BoilerpipeFilter
Adds the labels of the preceding block to the current block, optionally adding a prefix.
-
-
Field Summary
Fields Modifier and Type Field Description static AddPrecedingLabelsFilterINSTANCEstatic AddPrecedingLabelsFilterINSTANCE_PRE
-
Constructor Summary
Constructors Constructor Description AddPrecedingLabelsFilter(java.lang.String labelPrefix)Creates a newAddPrecedingLabelsFilterinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanprocess(TextDocument doc)Processes the given documentdoc.
-
-
-
Field Detail
-
INSTANCE
public static final AddPrecedingLabelsFilter INSTANCE
-
INSTANCE_PRE
public static final AddPrecedingLabelsFilter INSTANCE_PRE
-
-
Constructor Detail
-
AddPrecedingLabelsFilter
public AddPrecedingLabelsFilter(java.lang.String labelPrefix)
Creates a newAddPrecedingLabelsFilterinstance.- 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
-
-