com.basistech.rlp.lucene
Class RLPPOSFilter

java.lang.Object
  extended by TokenFilter
      extended by com.basistech.rlp.lucene.RLPPOSFilter

public class RLPPOSFilter
extends TokenFilter

This Filter removes tokens based on the POS (part-of-speech) tags that are stored in each token's payload by RLPTokenizer.


Constructor Summary
RLPPOSFilter(TokenStream input, String[] posArray)
          Constructor that takes the allowed POS list as an array of Strings.
 
Method Summary
 Token next(Token result)
          Iterates to the next token until a token whose part-of-speech tag is in the list, or the tokens are exhausted.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RLPPOSFilter

public RLPPOSFilter(TokenStream input,
                    String[] posArray)
Constructor that takes the allowed POS list as an array of Strings. Only Tokens of the part-of-speech tags that are listed in the list will pass this filter. Note that the part-of-speech tags depend on the language. Please refer the RLP Developer's Guide for the list of POS tags.

Parameters:
input - The source of tokens to this filter.
posArray - An array of the POS tags that will pass through this filter.
Method Detail

next

public Token next(Token result)
           throws IOException
Iterates to the next token until a token whose part-of-speech tag is in the list, or the tokens are exhausted.

Parameters:
result - A token that will be used to return the next token.
Returns:
The next token; null if there are no more tokens.
Throws:
IOException
See Also:
TokenStream


Copyright © 2007-2008 Basis Technology Corporation. All Rights Reserved.