aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2013-10-09 20:33:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-09 20:33:10 -0700
commit8087791167c23fd3f1b6fb3a97a323f93e9e2a6c (patch)
tree572914db22ad312e99353364fb5933bf3c10addb /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
parent445291b4db6bb55a2d64f9b93bb50708bb0a19b7 (diff)
parentaa958adfaf796abf127a2cb908d2993209cd44ca (diff)
downloadlatinime-8087791167c23fd3f1b6fb3a97a323f93e9e2a6c.tar.gz
latinime-8087791167c23fd3f1b6fb3a97a323f93e9e2a6c.tar.xz
latinime-8087791167c23fd3f1b6fb3a97a323f93e9e2a6c.zip
am aa958adf: am 73ddd404: am 78409cd9: Merge "Separate shortcut targets from the trie file."
* commit 'aa958adfaf796abf127a2cb908d2993209cd44ca': Separate shortcut targets from the trie file.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FormatSpec.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
index a5516bd41..5a5d7af6b 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java
@@ -266,15 +266,28 @@ public final class FormatSpec {
// tat = Terminal Address Table
static final String TERMINAL_ADDRESS_TABLE_FILE_EXTENSION = ".tat";
static final String BIGRAM_FILE_EXTENSION = ".bigram";
+ static final String SHORTCUT_FILE_EXTENSION = ".shortcut";
static final String LOOKUP_TABLE_FILE_SUFFIX = "_lookup";
static final String CONTENT_TABLE_FILE_SUFFIX = "_index";
static final int FREQUENCY_AND_FLAGS_SIZE = 2;
static final int TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE = 3;
+
+ // With the English main dictionary as of October 2013, the size of bigram address table is
+ // is 584KB with the block size being 4.
+ // This is 91% of that of full address table.
static final int BIGRAM_ADDRESS_TABLE_BLOCK_SIZE = 4;
static final int BIGRAM_CONTENT_COUNT = 1;
static final int BIGRAM_FREQ_CONTENT_INDEX = 0;
static final String BIGRAM_FREQ_CONTENT_ID = "_freq";
+ static final int SHORTCUT_CONTENT_COUNT = 1;
+ static final int SHORTCUT_CONTENT_INDEX = 0;
+ // With the English main dictionary as of October 2013, the size of shortcut address table is
+ // 29KB with the block size being 64.
+ // This is only 4.4% of that of full address table.
+ static final int SHORTCUT_ADDRESS_TABLE_BLOCK_SIZE = 64;
+ static final String SHORTCUT_CONTENT_ID = "_shortcut";
+
static final int NO_CHILDREN_ADDRESS = Integer.MIN_VALUE;
static final int NO_PARENT_ADDRESS = 0;
static final int NO_FORWARD_LINK_ADDRESS = 0;