diff options
author | 2013-08-26 08:28:44 +0000 | |
---|---|---|
committer | 2013-08-26 08:28:44 +0000 | |
commit | d21adb586506e292de471eb2e0dcea0c87019d0a (patch) | |
tree | 6922c1f3f0f278eeee375cd572c234f4e8e4e331 /java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java | |
parent | 4e7825cb583503504f931265ef4405f6c12e9e85 (diff) | |
parent | 752a33640c0160a2f836f716bf60e4991c07da1c (diff) | |
download | latinime-d21adb586506e292de471eb2e0dcea0c87019d0a.tar.gz latinime-d21adb586506e292de471eb2e0dcea0c87019d0a.tar.xz latinime-d21adb586506e292de471eb2e0dcea0c87019d0a.zip |
Merge "[Refactor] Add DictDecoder.readUnigramsAndBigramsBinary."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java index 77e6393ee..1fff9b49e 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver3DictDecoder.java @@ -31,6 +31,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.TreeMap; /** * An implementation of DictDecoder for version 3 binary dictionary. @@ -317,4 +318,16 @@ public class Ver3DictDecoder implements DictDecoder { } return BinaryDictIOUtils.getTerminalPosition(this, word); } + + @Override + public void readUnigramsAndBigramsBinary(final TreeMap<Integer, String> words, + final TreeMap<Integer, Integer> frequencies, + final TreeMap<Integer, ArrayList<PendingAttribute>> bigrams) + throws IOException, UnsupportedFormatException { + if (mDictBuffer == null) { + openDictBuffer(); + } + BinaryDictIOUtils.readUnigramsAndBigramsBinary(this, words, frequencies, bigrams); + } + } |