public class StringTagger extends Object
See examples.StringTaggerDemo in the Sen source for an example of how to use this class
Thread Safety: Objects of this class are NOT thread safe and
should not be accessed simultaneously by multiple threads. Note that creating
additional instances using SenFactory is relatively cheap in both
memory and time
| Constructor and Description |
|---|
StringTagger(Tokenizer tokenizer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(StreamFilter filter)
Add a
StreamFilter to be applied during analysis |
List<Token> |
analyze(char[] surface)
Deprecated.
use
analyze(char[], List) instead. |
List<Token> |
analyze(char[] surface,
List<Token> reuse)
Decompose a string into its most likely constituent morphemes
|
List<Token> |
analyze(String surface)
Deprecated.
use
analyze(String, List) instead. |
List<Token> |
analyze(String surface,
List<Token> reuse)
Decompose a string into its most likely constituent morphemes
|
void |
removeFilters()
Remove all current
StreamFilters |
public StringTagger(Tokenizer tokenizer)
tokenizer - The Tokenizer to use for analysispublic void addFilter(StreamFilter filter)
StreamFilter to be applied during analysisfilter - The StreamFilter to addpublic void removeFilters()
StreamFilterspublic List<Token> analyze(String surface, List<Token> reuse) throws IOException
surface - The string to analyseTokens representing the most likely morphemesIOException@Deprecated public List<Token> analyze(String surface) throws IOException
analyze(String, List) instead.IOExceptionpublic List<Token> analyze(char[] surface, List<Token> reuse) throws IOException
surface - The string to analyseTokens representing the most likely morphemesIOException@Deprecated public List<Token> analyze(char[] surface) throws IOException
analyze(char[], List) instead.IOException