| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final Pattern |
| Access | Constructor and Description |
|---|---|
| public | CompoundCharacterTokenizer(Set<String>
A set of strings like _79_99_, _80_99_ or _92_99_ . compoundWords)Constructor. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| public List | |
| private void |
| GLYPH_ID_SEPARATOR | back to summary |
|---|---|
| private static final String GLYPH_ID_SEPARATOR | |
| regexExpression | back to summary |
|---|---|
| private final Pattern regexExpression | |
| CompoundCharacterTokenizer | back to summary |
|---|---|
| public CompoundCharacterTokenizer(Set<String> compoundWords) Constructor. Calls getRegexFromTokens which returns strings like (_79_99_)|(_80_99_)|(_92_99_) and creates a regexp assigned to regexExpression. See the code in GlyphArraySplitterRegexImpl on how these strings were created. It is assumed the compound words are sorted in descending order of length. | |
| CompoundCharacterTokenizer | back to summary |
|---|---|
| public CompoundCharacterTokenizer(Pattern pattern) | |
| getRegexFromTokens | back to summary |
|---|---|
| private String getRegexFromTokens(Set<String> compoundWords) | |
| tokenize | back to summary |
|---|---|
| public List Tokenize a string into tokens. | |
| validateCompoundWords | back to summary |
|---|---|
| private void validateCompoundWords(Set<String> compoundWords) Validate the compound words. They should not be null or empty and should start and end with the GLYPH_ID_SEPARATOR | |