aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dicttool/src
diff options
context:
space:
mode:
authorYuichiro Hanada <yhanada@google.com>2013-09-12 17:46:09 +0900
committerYuichiro Hanada <yhanada@google.com>2013-09-12 20:14:09 +0900
commit0e40cd0c40f2c731f91ccd0561e251262e5a2614 (patch)
treeebbb0a42820b1c5d1d18a5f3282ecec000b53520 /tools/dicttool/src
parentbe470f06e48e40a0def32e0f34e3ca48113937b5 (diff)
downloadlatinime-0e40cd0c40f2c731f91ccd0561e251262e5a2614.tar.gz
latinime-0e40cd0c40f2c731f91ccd0561e251262e5a2614.tar.xz
latinime-0e40cd0c40f2c731f91ccd0561e251262e5a2614.zip
Add getDictDecoder.
Bug: 9618601 Change-Id: I173100ac704c03f7d5d0d53477e83cab5d1110d4
Diffstat (limited to 'tools/dicttool/src')
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java4
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java
index 1417ca44e..fa80385fc 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java
@@ -18,9 +18,9 @@ package com.android.inputmethod.latin.dicttool;
import com.android.inputmethod.latin.makedict.BinaryDictDecoderUtils;
import com.android.inputmethod.latin.makedict.DictDecoder;
+import com.android.inputmethod.latin.makedict.FormatSpec;
import com.android.inputmethod.latin.makedict.FusionDictionary;
import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
-import com.android.inputmethod.latin.makedict.Ver3DictDecoder;
import org.xml.sax.SAXException;
@@ -185,7 +185,7 @@ public final class BinaryDictOffdeviceUtils {
crash(filename, new RuntimeException(
filename + " does not seem to be a dictionary file"));
} else {
- final DictDecoder dictDecoder = new Ver3DictDecoder(decodedSpec.mFile,
+ final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file,
DictDecoder.USE_BYTEARRAY);
if (report) {
System.out.println("Format : Binary dictionary format");
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java
index 767c147bf..5302e976e 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java
@@ -267,7 +267,7 @@ public class DictionaryMaker {
private static FusionDictionary readBinaryFile(final String binaryFilename)
throws FileNotFoundException, IOException, UnsupportedFormatException {
final File file = new File(binaryFilename);
- final DictDecoder dictDecoder = new Ver3DictDecoder(file);
+ final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file);
return dictDecoder.readDictionaryBinary(null, false /* deleteDictIfBroken */);
}