Package com.ibm.icu.impl.breakiter
Class BytesDictionaryMatcher
java.lang.Object
com.ibm.icu.impl.breakiter.DictionaryMatcher
com.ibm.icu.impl.breakiter.BytesDictionaryMatcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetType()intmatches(CharacterIterator text_, int maxLength, int[] lengths, int[] count_, int limit, int[] values) Find dictionary words that match the text.private inttransform(int c) Methods inherited from class com.ibm.icu.impl.breakiter.DictionaryMatcher
matches
-
Field Details
-
characters
private final byte[] characters -
transform
private final int transform
-
-
Constructor Details
-
BytesDictionaryMatcher
public BytesDictionaryMatcher(byte[] chars, int transform)
-
-
Method Details
-
transform
private int transform(int c) -
matches
public int matches(CharacterIterator text_, int maxLength, int[] lengths, int[] count_, int limit, int[] values) Description copied from class:DictionaryMatcherFind dictionary words that match the text.- Specified by:
matchesin classDictionaryMatcher- 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.
-
getType
public int getType()- Specified by:
getTypein classDictionaryMatcher- Returns:
- the kind of dictionary that this matcher is using
-