|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.tokenizer.ModifiedTokenizerFactory
com.aliasi.tokenizer.ModifyTokenTokenizerFactory
public abstract class ModifyTokenTokenizerFactory
The abstract base class ModifyTokenTokenizerFactory
adapts token and whitespace modifiers to modify tokenizer
factories.
The method modifyToken(String) may be used to
modify or remove tokens from tokenizer outputs. The method
modifyWhitespace(String) may be used to modify the
whitespace returned by a tokenizer. Both methods are given
pass-through implementations in this class.
| Constructor Summary | |
|---|---|
ModifyTokenTokenizerFactory(TokenizerFactory factory)
Construct a token-modifying tokenizer factory with the specified base factory. |
|
| Method Summary | |
|---|---|
Tokenizer |
modify(Tokenizer tokenizer)
Return a modified version of the specified tokenizer that modifies tokens and whitespaces as specified by the corresponding string modifier methods. |
String |
modifyToken(String token)
Return a modified form of the specified token, or null to remove it. |
String |
modifyWhitespace(String whitespace)
Return the modified form of the specified whitespace. |
| Methods inherited from class com.aliasi.tokenizer.ModifiedTokenizerFactory |
|---|
baseTokenizerFactory, tokenizer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModifyTokenTokenizerFactory(TokenizerFactory factory)
factory - Base tokenizer factory.| Method Detail |
|---|
public final Tokenizer modify(Tokenizer tokenizer)
modify in class ModifiedTokenizerFactorytokenizer - Tokenizer to modify.
public String modifyToken(String token)
null to remove it.
The base implementation in this class simply returns the specified token.
token - Token to modify.
null to remove it.public String modifyWhitespace(String whitespace)
The base implementation in this class simply returns the specified whitespace.
whitespace - Whitespace to modify.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||