From 5128935ac4d7961e3c863270b828e47a79b97235 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Fri, 28 Feb 2014 21:06:03 +0900 Subject: Add header attributes for evaluation. Bug: 13197276 Change-Id: Ib5247da691ff24a73e13485288237ccc51bb54f0 --- .../com/android/inputmethod/latin/ExpandableBinaryDictionary.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java') diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index b18951500..26545acbd 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -64,6 +64,9 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { private static final int TIMEOUT_FOR_READ_OPS_IN_MILLISECONDS = 100; private static final int TIMEOUT_FOR_READ_OPS_FOR_TESTS_IN_MILLISECONDS = 10000; + private static final int DEFAULT_MAX_UNIGRAM_COUNT = 10000; + private static final int DEFAULT_MAX_BIGRAM_COUNT = 10000; + /** * The maximum length of a word in this dictionary. */ @@ -207,6 +210,10 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { attributeMap.put(DictionaryHeader.DICTIONARY_LOCALE_KEY, mLocale.toString()); attributeMap.put(DictionaryHeader.DICTIONARY_VERSION_KEY, String.valueOf(TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis()))); + attributeMap.put(DictionaryHeader.MAX_UNIGRAM_COUNT_KEY, + String.valueOf(DEFAULT_MAX_UNIGRAM_COUNT)); + attributeMap.put(DictionaryHeader.MAX_BIGRAM_COUNT_KEY, + String.valueOf(DEFAULT_MAX_BIGRAM_COUNT)); return attributeMap; } -- cgit v1.2.3-83-g751a