/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 | BinaryDictUtils.java | 19 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions; 20 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; 31 public static final FormatSpec.FormatOptions STATIC_OPTIONS = 32 new FormatSpec.FormatOptions(FormatSpec.VERSION202); 33 public static final FormatSpec.FormatOptions DYNAMIC_OPTIONS_WITHOUT_TIMESTAMP = 34 new FormatSpec.FormatOptions(FormatSpec.VERSION4, false /* hasTimestamp */); 35 public static final FormatSpec.FormatOptions DYNAMIC_OPTIONS_WITH_TIMESTAMP = 36 new FormatSpec.FormatOptions(FormatSpec.VERSION4, true /* hasTimestamp */); 39 final FormatSpec.FormatOptions formatOptions) { in makeDictionaryOptions() 55 if (formatOptions.mVersion == FormatSpec.VERSION2 in getDictFile() [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 | Ver2DictEncoder.java | 22 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; 109 int currentCodePointTableIndex = FormatSpec.MINIMAL_ONE_BYTE_CHARACTER_VALUE; in makeCodePointTable() 115 if (FormatSpec.MAXIMAL_ONE_BYTE_CHARACTER_VALUE < ++currentCodePointTableIndex) { in makeCodePointTable() 128 if (formatOptions.mVersion != FormatSpec.VERSION202) { in writeDictionary() 142 < FormatSpec.MINIMUM_SUPPORTED_VERSION_OF_CODE_POINT_TABLE) { in writeDictionary() 204 (ptNodeCount | FormatSpec.LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE_FLAG) : ptNodeCount; in writePtNodeCount() 215 FormatSpec.PTNODE_FLAGS_SIZE); in writePtNodeFlags() 223 mBuffer[mPosition++] = FormatSpec.PTNODE_CHARACTERS_TERMINATOR; in writeCharacters() 230 FormatSpec.PTNODE_FREQUENCY_SIZE); in writeFrequency() 260 - (mPosition + FormatSpec.PTNODE_ATTRIBUTE_FLAGS_SIZE); in writeBigrams() [all …]
|
D | BinaryDictDecoderEncoderTests.java | 29 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; 91 final int maxBigrams = Math.min(sWords.size(), FormatSpec.MAX_BIGRAMS_IN_A_PTNODE - 1); in BinaryDictDecoderEncoderTests() 161 final FormatSpec.FormatOptions formatOptions) { in timeWritingDictToFile() 205 final FormatSpec.FormatOptions formatOptions) { in outputOptions() 237 final int bufferType, final FormatSpec.FormatOptions formatOptions, in runReadAndWrite() 259 final FormatSpec.FormatOptions formatOptions) { in runReadAndWriteTests() 290 final FormatSpec.FormatOptions formatOptions = in testCharacterTableIsPresent() 291 new FormatSpec.FormatOptions( in testCharacterTableIsPresent() 292 FormatSpec.MINIMUM_SUPPORTED_STATIC_VERSION); in testCharacterTableIsPresent() 432 final FormatSpec.FormatOptions formatOptions, final String message) { [all …]
|
D | Ver4DictEncoder.java | 24 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions; 52 if (formatOptions.mVersion != FormatSpec.VERSION4) { in writeDictionary() 60 FormatSpec.VERSION4, LocaleUtils.constructLocaleFromString( in writeDictionary()
|
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 | 35 import com.android.inputmethod.latin.makedict.FormatSpec; 122 final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403); in testIsValidDictionary() 138 final File dictFile = createEmptyDictionaryAndGetFile(FormatSpec.VERSION403); in testConstructingDictionaryOnMemory() 143 FormatSpec.VERSION403, new HashMap<String, String>()); in testConstructingDictionaryOnMemory() 145 assertEquals(FormatSpec.VERSION403, binaryDictionary.getFormatVersion()); in testConstructingDictionaryOnMemory() 153 assertEquals(FormatSpec.VERSION403, binaryDictionary.getFormatVersion()); in testConstructingDictionaryOnMemory() 160 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testAddTooLongWord() 228 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testAddUnigramWord() 259 final BinaryDictionary binaryDictionary = getEmptyBinaryDictionary(FormatSpec.VERSION403); in testRandomlyAddUnigramWord() 279 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 | CombinedInputOutput.java | 19 import com.android.inputmethod.latin.makedict.FormatSpec; 20 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
|
D | Info.java | 19 import com.android.inputmethod.latin.makedict.FormatSpec;
|
/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 307 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;
|