mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-21569 LSTM: Remove Java 8 dependency
This commit is contained in:
parent
aef3eb3910
commit
a7a2ad0501
1 changed files with 2 additions and 1 deletions
|
@ -153,7 +153,8 @@ public class LSTMBreakEngine extends DictionaryBreakEngine {
|
|||
abstract public void vectorize(CharacterIterator fIter, int rangeStart, int rangeEnd,
|
||||
List<Integer> offsets, List<Integer> indicies);
|
||||
protected int getIndex(String token) {
|
||||
return fDict.getOrDefault(token, fDict.size());
|
||||
Integer res = fDict.get(token);
|
||||
return (res == null) ? fDict.size() : res;
|
||||
}
|
||||
private Map<String, Integer> fDict;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue