Package com.ibm.icu.impl.breakiter
Class DictionaryMatcher
java.lang.Object
com.ibm.icu.impl.breakiter.DictionaryMatcher
- Direct Known Subclasses:
BytesDictionaryMatcher
,CharsDictionaryMatcher
The DictionaryMatcher interface is used to allow arbitrary "types" of
back-end data structures to be used with the break iteration code.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
getType()
int
matches
(CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit) abstract int
matches
(CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit, int[] values) Find dictionary words that match the text.
-
Constructor Details
-
DictionaryMatcher
DictionaryMatcher()
-
-
Method Details
-
matches
public abstract int matches(CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit, int[] values) Find dictionary words that match the text.- Parameters:
text
- A CharacterIterator representing the text. The iterator is left after the longest prefix match in the dictionary.maxLength
- The maximum number of code units to match.lengths
- An array that is filled with the lengths of words that matched.count
- Filled with the number of elements output in lengths.limit
- The maximum amount of words to output. Must be less than or equal to lengths.length.values
- Filled with the weight values associated with the various words.- Returns:
- The number of characters in text that were matched.
-
matches
-
getType
public abstract int getType()- Returns:
- the kind of dictionary that this matcher is using
-