org.egothor.parser.filter
Class ParagraphFilter

java.lang.Object
  extended by org.egothor.core.Filter
      extended by org.egothor.parser.filter.ParagraphFilter
All Implemented Interfaces:
Sequence<Token>

public final class ParagraphFilter
extends Filter

Filter sets the sentence, paragraph and sentenceInParagraph fields in the Token class, just like the ParagraphPunctFilter. The only difference is that this filter removes from the Token sequence only the paragraph delimiter tokens, but keeps other punctuation. It is suitable for parsing document to be written to user, i.e. in DocumentDuplicities.createReport(java.lang.String, boolean, boolean, double) method.

Author:
Kate�ina Dufkov�

Field Summary
 
Fields inherited from class org.egothor.core.Filter
prev
 
Constructor Summary
ParagraphFilter(Sequence<Token> prev)
          Constructor for the ParagraphPunctFilter object
 
Method Summary
 Token next()
          Return the next token.
 
Methods inherited from class org.egothor.core.Filter
action, getPrevTokenizer, setPrevTokenizer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParagraphFilter

public ParagraphFilter(Sequence<Token> prev)
Constructor for the ParagraphPunctFilter object

Parameters:
prev - tokenizer used by the filter
Method Detail

next

public Token next()
Return the next token.

Specified by:
next in interface Sequence<Token>
Overrides:
next in class Filter
Returns:
the next token
See Also:
Filter.next()