Home
last modified time | relevance | path

Searched refs:FormatSpec (Results 1 – 22 of 22) 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 …]
DBinaryDictUtils.java19 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 …]
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 …]
DVer2DictEncoder.java22 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 …]
DBinaryDictDecoderEncoderTests.java29 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 …]
DVer4DictEncoder.java24 import com.android.inputmethod.latin.makedict.FormatSpec.FormatOptions;
52 if (formatOptions.mVersion != FormatSpec.VERSION4) { in writeDictionary()
60 FormatSpec.VERSION4, LocaleUtils.constructLocaleFromString( in writeDictionary()
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.java35 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/
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()
DCombinedInputOutput.java19 import com.android.inputmethod.latin.makedict.FormatSpec;
20 import com.android.inputmethod.latin.makedict.FormatSpec.DictionaryOptions;
DInfo.java19 import com.android.inputmethod.latin.makedict.FormatSpec;
/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
307 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;