de.l3s.boilerpipe.filters.heuristics
Class AddPrecedingLabelsFilter

java.lang.Object
  extended by 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.

Author:
Christian Kohlschütter

Field Summary
static AddPrecedingLabelsFilter INSTANCE
           
static AddPrecedingLabelsFilter INSTANCE_PRE
           
 
Constructor Summary
AddPrecedingLabelsFilter(java.lang.String labelPrefix)
          Creates a new AddPrecedingLabelsFilter instance.
 
Method Summary
 boolean process(TextDocument doc)
          Processes the given document doc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 new AddPrecedingLabelsFilter instance.

Parameters:
maxBlocksDistance - The maximum distance in blocks.
contentOnly -
Method Detail

process

public boolean process(TextDocument doc)
                throws BoilerpipeProcessingException
Description copied from interface: BoilerpipeFilter
Processes the given document doc.

Specified by:
process in interface BoilerpipeFilter
Parameters:
doc - The TextDocument that is to be processed.
Returns:
true if changes have been made to the TextDocument.
Throws:
BoilerpipeProcessingException