Home
last modified time | relevance | path

Searched refs:dictDecoder (Results 1 – 6 of 6) sorted by relevance

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictIOUtils.java77 private static void readUnigramsAndBigramsBinaryInner(final DictDecoder dictDecoder, in readUnigramsAndBigramsBinaryInner() argument
97 if (dictDecoder.getPosition() != p.mAddress) dictDecoder.setPosition(p.mAddress); in readUnigramsAndBigramsBinaryInner()
101 p.mNumOfPtNode = dictDecoder.readPtNodeCount(); in readUnigramsAndBigramsBinaryInner()
102 p.mAddress = dictDecoder.getPosition(); in readUnigramsAndBigramsBinaryInner()
109 final PtNodeInfo ptNodeInfo = dictDecoder.readPtNode(p.mAddress); in readUnigramsAndBigramsBinaryInner()
127 p.mAddress = dictDecoder.getPosition(); in readUnigramsAndBigramsBinaryInner()
148 /* package */ static void readUnigramsAndBigramsBinary(final DictDecoder dictDecoder, in readUnigramsAndBigramsBinary() argument
153 final DictionaryHeader header = dictDecoder.readHeader(); in readUnigramsAndBigramsBinary()
154 readUnigramsAndBigramsBinaryInner(dictDecoder, header.mBodyOffset, words, in readUnigramsAndBigramsBinary()
169 /* package */ static int getTerminalPosition(final DictDecoder dictDecoder, in getTerminalPosition() argument
[all …]
DBinaryDictDecoderUtils.java317 /* package for tests */ static WeightedString getWordAtPosition(final DictDecoder dictDecoder, in getWordAtPosition() argument
320 final int originalPos = dictDecoder.getPosition(); in getWordAtPosition()
321 dictDecoder.setPosition(pos); in getWordAtPosition()
322 result = getWordAtPositionWithoutParentAddress(dictDecoder, headerSize, pos); in getWordAtPosition()
323 dictDecoder.setPosition(originalPos); in getWordAtPosition()
328 final DictDecoder dictDecoder, final int headerSize, final int pos) { in getWordAtPositionWithoutParentAddress() argument
329 dictDecoder.setPosition(headerSize); in getWordAtPositionWithoutParentAddress()
330 final int count = dictDecoder.readPtNodeCount(); in getWordAtPositionWithoutParentAddress()
331 int groupPos = dictDecoder.getPosition(); in getWordAtPositionWithoutParentAddress()
337 PtNodeInfo info = dictDecoder.readPtNode(groupPos); in getWordAtPositionWithoutParentAddress()
[all …]
DBinaryDictDecoderEncoderTests.java219 final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(), in timeReadingAndCheckDict() local
222 dict = dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); in timeReadingAndCheckDict()
299 final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(), in testCharacterTableIsPresent() local
301 final DictionaryHeader fileHeader = dictDecoder.readHeader(); in testCharacterTableIsPresent()
415 final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length(),
418 dictDecoder.readUnigramsAndBigramsBinary(resultWords, resultFreqs, resultBigrams);
491 private static String getWordFromBinary(final DictDecoder dictDecoder, final int address) {
492 if (dictDecoder.getPosition() != 0) dictDecoder.setPosition(0);
496 fileHeader = dictDecoder.readHeader();
503 return BinaryDictDecoderUtils.getWordAtPosition(dictDecoder, fileHeader.mBodyOffset,
[all …]
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/
DDictionaryMaker.java234 final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(file, 0, file.length()); in readBinaryFile() local
235 return dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); in readBinaryFile()
DBinaryDictOffdeviceUtils.java286 final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder( in getDictionary() local
294 return dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); in getDictionary()
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/
DBinaryDictOffdeviceUtilsTests.java111 final DictDecoder dictDecoder = BinaryDictIOUtils.getDictDecoder(decodeSpec.mResult, 0, in testGetRawDictWorks() local
114 dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); in testGetRawDictWorks()