com.basistech.rlp.solr
Class RLPPOSFilterFactory
java.lang.Object
BaseTokenFilterFactory
com.basistech.rlp.solr.RLPPOSFilterFactory
public class RLPPOSFilterFactory
- extends BaseTokenFilterFactory
Factory for the POS (part-of-speech) Filter that passes only tokens with
predetermined POS tags.
This must be used in conjunction with RLPTokenizerFactory.
Method Summary |
TokenStream |
create(TokenStream input)
Creates a POS (part-of-speech) filter. |
void |
inform(ResourceLoader loader)
Specifies the list of allowed POS tags. |
RLPPOSFilterFactory
public RLPPOSFilterFactory()
inform
public void inform(ResourceLoader loader)
- Specifies the list of allowed POS tags.
One attribute is supported in schema.xml for this factory class:
- pos="file-path-to-POS-list-text-file"
The file is a plain text file that lists allowed POS tags, one per line.
This attribute must be specified.
Valid POS tags depend on the Base Linguistic language processor that you use.
The file path can be an absolute path, or a relative path to the solr/conf directory or the current working directory.
- Parameters:
loader
- SOLR resource loader.- See Also:
SolrResourceLoader
create
public TokenStream create(TokenStream input)
- Creates a POS (part-of-speech) filter.
- Parameters:
input
- The input text.
- Returns:
- The POS filter.
Copyright © 2007-2008 Basis Technology Corporation. All Rights Reserved.