/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictEncoderUtils.java | 20 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 …]
|
D | BinaryDictIOUtils.java | 81 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 …]
|
D | BinaryDictDecoderUtils.java | 129 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 …]
|
D | DictEncoder.java | 20 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
|
D | FusionDictionary.java | 21 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/ |
D | BinaryDictionaryTests.java | 28 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/ |
D | BinaryDictOffdeviceUtils.java | 23 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()
|
D | DictionaryMaker.java | 23 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()
|
D | Info.java | 19 import com.android.inputmethod.latin.makedict.FormatSpec; 54 if (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY in showInfo() 87 + (FormatSpec.SHORTCUT_WHITELIST_FREQUENCY in showWordInfo()
|
D | CombinedInputOutput.java | 19 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/ |
D | DictionaryHeader.java | 19 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()
|
D | FormatSpec.java | 28 public final class FormatSpec { class 304 private FormatSpec() { in FormatSpec() method in FormatSpec
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/ |
D | BinaryDictOffdeviceUtilsTests.java | 29 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/ |
D | ExpandableBinaryDictionary.java | 28 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()
|
D | BinaryDictionary.java | 31 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/ |
D | BinaryDictEncoderFlattenTreeTests.java | 19 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
|
D | FusionDictionaryTest.java | 19 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | UpdateHandler.java | 43 import com.android.inputmethod.latin.makedict.FormatSpec; 83 FormatSpec.MAXIMUM_SUPPORTED_STATIC_VERSION;
|