aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2013-09-25 08:45:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-25 08:45:39 +0000
commit399422f4b9f06c6692f18318c84f17c61ae83f9a (patch)
tree049a6c32235f796ebe50aa0c572aafc13e9f72fb /java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
parent1e69f3e637238407492aab536760644aca33f38d (diff)
parent22c5c450fecb856100059f4e5b34b847fb0acfa7 (diff)
downloadlatinime-399422f4b9f06c6692f18318c84f17c61ae83f9a.tar.gz
latinime-399422f4b9f06c6692f18318c84f17c61ae83f9a.tar.xz
latinime-399422f4b9f06c6692f18318c84f17c61ae83f9a.zip
Merge "Make Ver4DictEncoder write an address table of terminal nodes."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
index 36c5a2720..4c8ff8ea4 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
@@ -41,11 +41,13 @@ public class Ver4DictDecoder extends DictDecoder {
private static final int FILETYPE_TRIE = 1;
private static final int FILETYPE_FREQUENCY = 2;
+ private static final int FILETYPE_TERMINAL_ADDRESS_TABLE = 3;
private final File mDictDirectory;
private final DictionaryBufferFactory mBufferFactory;
private DictBuffer mDictBuffer;
private DictBuffer mFrequencyBuffer;
+ private DictBuffer mTerminalAddressTableBuffer;
@UsedForTesting
/* package */ Ver4DictDecoder(final File dictDirectory, final int factoryFlag) {
@@ -77,6 +79,9 @@ public class Ver4DictDecoder extends DictDecoder {
} else if (fileType == FILETYPE_FREQUENCY) {
return new File(mDictDirectory,
mDictDirectory.getName() + FormatSpec.FREQ_FILE_EXTENSION);
+ } else if (fileType == FILETYPE_TERMINAL_ADDRESS_TABLE) {
+ return new File(mDictDirectory,
+ mDictDirectory.getName() + FormatSpec.TERMINAL_ADDRESS_TABLE_FILE_EXTENSION);
} else {
throw new RuntimeException("Unsupported kind of file : " + fileType);
}
@@ -87,6 +92,8 @@ public class Ver4DictDecoder extends DictDecoder {
final String filename = mDictDirectory.getName();
mDictBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_TRIE));
mFrequencyBuffer = mBufferFactory.getDictionaryBuffer(getFile(FILETYPE_FREQUENCY));
+ mTerminalAddressTableBuffer = mBufferFactory.getDictionaryBuffer(
+ getFile(FILETYPE_TERMINAL_ADDRESS_TABLE));
}
@Override