org.egothor.parser.filter
Class ParagraphPunctFilter

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

public final class ParagraphPunctFilter
extends Filter

Filter sets the sentence, paragraph and sentenceInParagraph fields in the Token class.

Author:
Kate�ina Dufkov�

Field Summary
 
Fields inherited from class org.egothor.core.Filter
prev
 
Constructor Summary
ParagraphPunctFilter(Sequence<Token> prev)
          Constructor for the ParagraphPunctFilter object
 
Method Summary
static boolean isParagraphDelimiter(Token t)
          Test whether a token is a paragraph delimiter.
static boolean isPunctuation(Token t)
          Test whether a token is a punctuation (mark).
 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

ParagraphPunctFilter

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

Parameters:
prev - tokenizer used by the filter
Method Detail

isParagraphDelimiter

public static boolean isParagraphDelimiter(Token t)
Test whether a token is a paragraph delimiter.

Parameters:
t - the Token to check
Returns:
true if it is a mark, false if not

isPunctuation

public static boolean isPunctuation(Token t)
Test whether a token is a punctuation (mark).

Parameters:
t - the Token to check
Returns:
true if it is a mark, false if not

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()