Interface TextTokenizerFactory
-
- All Known Implementing Classes:
DefaultTextTokenizerFactory
@API(EXPERIMENTAL) public interface TextTokenizerFactory
Each implementation ofTextTokenizer
should have its own implementation of this factory interface to provide instances of the tokenizer to aTextTokenizerRegistry
. The registry will populate a mapping of names to tokenizers using the methods of this interface.- See Also:
TextIndexMaintainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getName()
Get the unique name for the text tokenizer.TextTokenizer
getTokenizer()
Get an instance of the text tokenizer.
-
-
-
Method Detail
-
getName
@Nonnull String getName()
Get the unique name for the text tokenizer. This is the name that should be included in the index meta-data in order to indicate that this tokenizer should be used within a certain index.- Returns:
- the name of the tokenizer that this factory creates
-
getTokenizer
@Nonnull TextTokenizer getTokenizer()
Get an instance of the text tokenizer. For a given factory, each tokenizer should be of the same type, and it should match the result ofgetName()
.- Returns:
- an instance of the tokenizer that this factory creates
-
-