Home
last modified time | relevance | path

Searched refs:FormatSpec (Results 1 – 18 of 18) sorted by relevance

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictEncoderUtils.java20 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
65 if (characters.length > 1) size += FormatSpec.PTNODE_TERMINATOR_SIZE; in getPtNodeCharactersSize()
103 size += FormatSpec.PTNODE_FREQUENCY_SIZE; in getPtNodeMaximumSize()
105 size += FormatSpec.PTNODE_MAX_ADDRESS_SIZE; // For children address in getPtNodeMaximumSize()
107 size += (FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE in getPtNodeMaximumSize()
108 + FormatSpec.PTNODE_ATTRIBUTE_MAX_ADDRESS_SIZE) in getPtNodeMaximumSize()
139 return FormatSpec.PTNODE_FLAGS_SIZE + getPtNodeCharactersSize(ptNode, in getNodeHeaderSize()
154 assert(address <= FormatSpec.UINT24_MAX); in getByteSize()
157 } else if (Math.abs(address) <= FormatSpec.UINT8_MAX) { in getByteSize()
159 } else if (Math.abs(address) <= FormatSpec.UINT16_MAX) { in getByteSize()
[all …]
DBinaryDictIOUtils.java81 int[] pushedChars = new int[FormatSpec.MAX_WORD_LENGTH + 1]; in readUnigramsAndBigramsBinaryInner()
171 if (word == null) return FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
177 if (wordPos >= wordLen) return FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
199 return currentInfo.isTerminal() ? ptNodePos : FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
202 if (currentInfo.mChildrenAddress == FormatSpec.NO_CHILDREN_ADDRESS) { in getTerminalPosition()
203 return FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
211 return FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
214 return FormatSpec.NOT_VALID_WORD; in getTerminalPosition()
234 (ptNodeCount | FormatSpec.LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG) : ptNodeCount; in writePtNodeCount()
243 return FormatSpec.NO_CHILDREN_ADDRESS != address; in hasChildrenAddress()
[all …]
DBinaryDictDecoderUtils.java129 return codePoint >= FormatSpec.MINIMAL_ONE_BYTE_CHARACTER_VALUE in fitsOnOneByte()
130 && codePoint <= FormatSpec.MAXIMAL_ONE_BYTE_CHARACTER_VALUE; in fitsOnOneByte()
154 if (FormatSpec.INVALID_CHARACTER == character) return 1; in getCharSize()
228 buffer[index++] = FormatSpec.PTNODE_CHARACTERS_TERMINATOR; in writeString()
257 stream.write(FormatSpec.PTNODE_CHARACTERS_TERMINATOR); in writeString()
258 written += FormatSpec.PTNODE_TERMINATOR_SIZE; in writeString()
268 while (character != FormatSpec.INVALID_CHARACTER) { in readString()
286 if (FormatSpec.PTNODE_CHARACTERS_TERMINATOR == character) { in readChar()
287 return FormatSpec.INVALID_CHARACTER; in readChar()
301 if (FormatSpec.MAX_PTNODES_FOR_ONE_BYTE_PTNODE_COUNT >= msb) { in readPtNodeCount()
[all …]
DDictEncoder.java20 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
DFusionDictionary.java21 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
335 assert(probabilityInfo.mProbability <= FormatSpec.MAX_TERMINAL_FREQUENCY); in add()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DBinaryDictionaryTests.java28 import com.android.inputmethod.latin.makedict.FormatSpec;
110 final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403); in testIsValidDictionary()
125 final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403); in testConstructingDictionaryOnMemory()
130 FormatSpec.VERSION403, new HashMap<String, String>()); in testConstructingDictionaryOnMemory()
132 assertEquals(FormatSpec.VERSION403, binaryDictionary.getFormatVersion()); in testConstructingDictionaryOnMemory()
140 assertEquals(FormatSpec.VERSION403, binaryDictionary.getFormatVersion()); in testConstructingDictionaryOnMemory()
146 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testAddTooLongWord()
213 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testAddUnigramWord()
243 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testRandomlyAddUnigramWord()
262 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testAddBigramWords()
[all …]
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/
DBinaryDictOffdeviceUtils.java23 import com.android.inputmethod.latin.makedict.FormatSpec;
24 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
25 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
170 if (magicNumber != FormatSpec.MAGIC_NUMBER) { in process()
175 if (version != FormatSpec.VERSION2 && version != FormatSpec.VERSION201 in process()
176 && version != FormatSpec.VERSION202) { in process()
DDictionaryMaker.java23 import com.android.inputmethod.latin.makedict.FormatSpec;
123 int outputBinaryFormatVersion = FormatSpec.VERSION202; // the default version is 202. in Arguments()
134 outputBinaryFormatVersion = FormatSpec.VERSION4; in Arguments()
290 final FormatSpec.FormatOptions formatOptions = new FormatSpec.FormatOptions(version); in writeBinaryDictionary()
292 if (version == FormatSpec.VERSION4) { in writeBinaryDictionary()
DInfo.java19 import com.android.inputmethod.latin.makedict.FormatSpec;
54 if (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY in showInfo()
87 + (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY in showWordInfo()
DCombinedInputOutput.java19 import com.android.inputmethod.latin.makedict.FormatSpec;
20 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
161 ? FormatSpec.SHORTCUT_WHITELIST_FREQUENCY in readDictionaryCombined()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/
DDictionaryHeader.java19 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
20 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
65 mBodyOffset = formatOptions.mVersion < FormatSpec.VERSION4 ? headerSize : 0; in DictionaryHeader()
DFormatSpec.java28 public final class FormatSpec { class
304 private FormatSpec() { in FormatSpec() method in FormatSpec
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/
DBinaryDictOffdeviceUtilsTests.java29 import com.android.inputmethod.latin.makedict.FormatSpec;
30 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
31 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
104 dictEncoder.writeDictionary(dict, new FormatOptions(FormatSpec.VERSION202, false)); in testGetRawDictWorks()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DExpandableBinaryDictionary.java28 import com.android.inputmethod.latin.makedict.FormatSpec;
76 private static final int DICTIONARY_FORMAT_VERSION = FormatSpec.VERSION4;
118 return formatVersion == FormatSpec.VERSION4; in matchesExpectedBinaryDictFormatVersionForThisType()
124 return formatVersion == FormatSpec.VERSION402; in needsToMigrateDictionary()
DBinaryDictionary.java31 import com.android.inputmethod.latin.makedict.FormatSpec;
32 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
264 new FormatSpec.FormatOptions(outFormatVersion[0], hasHistoricalInfo)); in getHeader()
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/
DBinaryDictEncoderFlattenTreeTests.java19 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
DFusionDictionaryTest.java19 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/
DUpdateHandler.java43 import com.android.inputmethod.latin.makedict.FormatSpec;
83 FormatSpec.MAXIMUM_SUPPORTED_STATIC_VERSION;