Package com.ibm.icu.impl.breakiter
Class DictionaryMatcher
- java.lang.Object
-
- com.ibm.icu.impl.breakiter.DictionaryMatcher
-
- Direct Known Subclasses:
BytesDictionaryMatcher
,CharsDictionaryMatcher
abstract class DictionaryMatcher extends java.lang.Object
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 Constructor Description DictionaryMatcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
getType()
int
matches(java.text.CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit)
abstract int
matches(java.text.CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit, int[] values)
Find dictionary words that match the text.
-
-
-
Method Detail
-
matches
public abstract int matches(java.text.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
public int matches(java.text.CharacterIterator text, int maxLength, int[] lengths, int[] count, int limit)
-
getType
public abstract int getType()
- Returns:
- the kind of dictionary that this matcher is using
-
-