/packages/inputmethods/LatinIME/native/dicttoolkit/tests/offdevice_intermediate_dict/ |
D | offdevice_intermediate_dict_test.cpp | 44 OffdeviceIntermediateDict dict = OffdeviceIntermediateDict( in TEST() local 46 EXPECT_EQ(nullptr, dict.getWordProperty(CodePointArrayView())); in TEST() 49 EXPECT_TRUE(dict.addWord(wordProperty0)); in TEST() 50 EXPECT_NE(nullptr, dict.getWordProperty(wordProperty0.getCodePoints())); in TEST() 53 EXPECT_TRUE(dict.addWord(wordProperty1)); in TEST() 54 EXPECT_NE(nullptr, dict.getWordProperty(wordProperty1.getCodePoints())); in TEST() 57 EXPECT_TRUE(dict.addWord(wordProperty2)); in TEST() 58 EXPECT_NE(nullptr, dict.getWordProperty(wordProperty2.getCodePoints())); in TEST() 61 EXPECT_TRUE(dict.addWord(wordProperty3)); in TEST() 62 EXPECT_NE(nullptr, dict.getWordProperty(wordProperty3.getCodePoints())); in TEST() [all …]
|
/packages/inputmethods/LatinIME/native/jni/ |
D | com_android_inputmethod_latin_BinaryDictionary.cpp | 99 static bool latinime_BinaryDictionary_flush(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_flush() argument 101 Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); in latinime_BinaryDictionary_flush() 111 jlong dict, jboolean mindsBlockByGC) { in latinime_BinaryDictionary_needsToRunGC() argument 112 Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); in latinime_BinaryDictionary_needsToRunGC() 117 static bool latinime_BinaryDictionary_flushWithGC(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_flushWithGC() argument 119 Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); in latinime_BinaryDictionary_flushWithGC() 128 static void latinime_BinaryDictionary_close(JNIEnv *env, jclass clazz, jlong dict) { in latinime_BinaryDictionary_close() argument 129 Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); in latinime_BinaryDictionary_close() 134 static void latinime_BinaryDictionary_getHeaderInfo(JNIEnv *env, jclass clazz, jlong dict, in latinime_BinaryDictionary_getHeaderInfo() argument 137 Dictionary *dictionary = reinterpret_cast<Dictionary *>(dict); in latinime_BinaryDictionary_getHeaderInfo() [all …]
|
D | com_android_inputmethod_latin_DicTraverseSession.cpp | 41 Dictionary *dict = reinterpret_cast<Dictionary *>(dictionary); in latinime_initDicTraverseSession() local 44 ts->init(dict, &emptyNgramContext, 0 /* suggestOptions */); in latinime_initDicTraverseSession() 50 ts->init(dict, &ngramContext, 0 /* suggestOptions */); in latinime_initDicTraverseSession()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictDecoderEncoderTests.java | 131 private static void addUnigrams(final int number, final FusionDictionary dict, in addUnigrams() argument 136 dict.add(word, new ProbabilityInfo(UNIGRAM_FREQ), false /* isNotAWord */, in addUnigrams() 141 private static void addBigrams(final FusionDictionary dict, in addBigrams() argument 147 dict.setBigram(words.get(w1), words.get(w2), new ProbabilityInfo(BIGRAM_FREQ)); in addBigrams() 160 private static long timeWritingDictToFile(final File file, final FusionDictionary dict, in timeWritingDictToFile() argument 172 dictEncoder.writeDictionary(dict, formatOptions); in timeWritingDictToFile() 183 private static void checkDictionary(final FusionDictionary dict, final List<String> words, in checkDictionary() argument 185 assertNotNull(dict); in checkDictionary() 189 final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, word); in checkDictionary() 197 final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, in checkDictionary() [all …]
|
D | Ver2DictEncoder.java | 82 static CodePointTable makeCodePointTable(final FusionDictionary dict) { in makeCodePointTable() argument 84 for (final WordProperty word : dict) { in makeCodePointTable() 125 public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions) in writeDictionary() argument 145 codePointTable = makeCodePointTable(dict); in writeDictionary() 148 BinaryDictEncoderUtils.writeDictionaryHeader(mOutStream, dict, formatOptions, in writeDictionary() 160 ArrayList<PtNodeArray> flatNodes = BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray); in writeDictionary() 163 BinaryDictEncoderUtils.computeAddresses(dict, flatNodes, in writeDictionary() 176 BinaryDictEncoderUtils.writePlacedPtNodeArray(dict, this, nodeArray, in writeDictionary() 249 final FusionDictionary dict) { in writeBigrams() argument 256 FusionDictionary.findWordInTree(dict.mRootNodeArray, bigram.mWord); in writeBigrams() [all …]
|
D | Ver4DictEncoder.java | 50 public void writeDictionary(FusionDictionary dict, FormatOptions formatOptions) in writeDictionary() argument 61 dict.mOptions.mAttributes.get(DictionaryHeader.DICTIONARY_LOCALE_KEY)), in writeDictionary() 62 dict.mOptions.mAttributes)) { in writeDictionary() 68 LocaleUtils.constructLocaleFromString(dict.mOptions.mAttributes.get( in writeDictionary() 76 for (final WordProperty wordProperty : dict) { in writeDictionary() 89 for (final WordProperty word0Property : dict) { in writeDictionary() 130 public void writePtNode(PtNode ptNode, FusionDictionary dict, in writePtNode() argument
|
D | BinaryDictEncoderUtils.java | 320 final FusionDictionary dict, in computeActualPtNodeArraySize() argument 341 FusionDictionary.findWordInTree(dict.mRootNodeArray, bigram.mWord)); in computeActualPtNodeArraySize() 406 /* package */ static ArrayList<PtNodeArray> computeAddresses(final FusionDictionary dict, in computeAddresses() argument 426 final boolean changed = computeActualPtNodeArraySize(ptNodeArray, dict, in computeAddresses() 652 /* package */ static void writePlacedPtNodeArray(final FusionDictionary dict, in writePlacedPtNodeArray() argument 673 dictEncoder.writePtNode(ptNode, dict, codePointToOneByteCodeMap); in writePlacedPtNodeArray() 743 final FusionDictionary dict, final FormatOptions formatOptions, in writeDictionaryHeader() argument 784 for (final String key : dict.mOptions.mAttributes.keySet()) { in writeDictionaryHeader() 785 final String value = dict.mOptions.mAttributes.get(key); in writeDictionaryHeader()
|
D | DictEncoder.java | 31 public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions) in writeDictionary() argument 37 public void writePtNode(final PtNode ptNode, final FusionDictionary dict, in writePtNode() argument
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/personalization/ |
D | UserHistoryDictionaryTests.java | 63 private static void assertDictionaryExists(final UserHistoryDictionary dict, in assertDictionaryExists() argument 66 dict.waitAllTasksForTests(); in assertDictionaryExists() 111 private static void clearHistory(final UserHistoryDictionary dict) { in clearHistory() argument 112 dict.waitAllTasksForTests(); in clearHistory() 113 dict.clear(); in clearHistory() 114 dict.close(); in clearHistory() 115 dict.waitAllTasksForTests(); in clearHistory() 128 final UserHistoryDictionary dict = PersonalizationHelper.getUserHistoryDictionary( in doTestRandomWords() local 130 clearHistory(dict); in doTestRandomWords() 135 dict, numberOfWords, random, true /* checksContents */, mCurrentTime)); in doTestRandomWords() [all …]
|
D | UserHistoryDictionaryTestsHelper.java | 77 public static boolean addAndWriteRandomWords(final UserHistoryDictionary dict, in addAndWriteRandomWords() argument 82 addWordsToDictionary(dict, words, currentTime); in addAndWriteRandomWords() 85 dict.waitAllTasksForTests(); in addAndWriteRandomWords() 88 if (!dict.isInDictionary(word)) { in addAndWriteRandomWords() 95 dict.close(); in addAndWriteRandomWords() 96 dict.waitAllTasksForTests(); in addAndWriteRandomWords() 100 private static void addWordsToDictionary(final UserHistoryDictionary dict, in addWordsToDictionary() argument 105 UserHistoryDictionary.addToDictionary(dict, ngramContext, word, true, timestamp); in addWordsToDictionary()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | BinaryDictionary.java | 173 private static native void getHeaderInfoNative(long dict, int[] outHeaderSize, in getHeaderInfoNative() argument 176 private static native boolean flushNative(long dict, String filePath); in flushNative() argument 177 private static native boolean needsToRunGCNative(long dict, boolean mindsBlockByGC); in needsToRunGCNative() argument 178 private static native boolean flushWithGCNative(long dict, String filePath); in flushWithGCNative() argument 179 private static native void closeNative(long dict); in closeNative() argument 180 private static native int getFormatVersionNative(long dict); in getFormatVersionNative() argument 181 private static native int getProbabilityNative(long dict, int[] word); in getProbabilityNative() argument 182 private static native int getMaxProbabilityOfExactMatchesNative(long dict, int[] word); in getMaxProbabilityOfExactMatchesNative() argument 183 private static native int getNgramProbabilityNative(long dict, int[][] prevWordCodePointArrays, in getNgramProbabilityNative() argument 185 private static native void getWordPropertyNative(long dict, int[] word, in getWordPropertyNative() argument [all …]
|
D | DictionaryFacilitatorImpl.java | 166 private void setSubDict(final String dictType, final ExpandableBinaryDictionary dict) { in setSubDict() argument 167 if (dict != null) { in setSubDict() 168 mSubDictMap.put(dictType, dict); in setSubDict() 207 final Dictionary dict; in closeDict() local 209 dict = mMainDict; in closeDict() 211 dict = mSubDictMap.remove(dictType); in closeDict() 213 if (dict != null) { in closeDict() 214 dict.close(); in closeDict() 262 final Object dict = factoryMethod.invoke(null /* obj */, in getSubDict() local 264 return (ExpandableBinaryDictionary) dict; in getSubDict() [all …]
|
D | DictionaryCollection.java | 119 for (final Dictionary dict : mDictionaries) in close() 120 dict.close(); in close() 133 public void removeDictionary(final Dictionary dict) { in removeDictionary() argument 134 if (mDictionaries.contains(dict)) { in removeDictionary() 135 mDictionaries.remove(dict); in removeDictionary() 137 Log.w(TAG, "This collection does not contain this dictionary: " + dict); in removeDictionary()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/ |
D | PersonalizationHelper.java | 54 final UserHistoryDictionary dict = ref == null ? null : ref.get(); in getUserHistoryDictionary() local 55 if (dict != null) { in getUserHistoryDictionary() 59 dict.reloadDictionaryIfRequired(); in getUserHistoryDictionary() 60 return dict; in getUserHistoryDictionary() 63 final UserHistoryDictionary dict = new UserHistoryDictionary( in getUserHistoryDictionary() local 65 sLangUserHistoryDictCache.put(lookupStr, new SoftReference<>(dict)); in getUserHistoryDictionary() 66 return dict; in getUserHistoryDictionary() 75 final UserHistoryDictionary dict = entry.getValue().get(); in removeAllUserHistoryDictionaries() local 76 if (dict != null) { in removeAllUserHistoryDictionaries() 77 dict.clear(); in removeAllUserHistoryDictionaries()
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/makedict/ |
D | FusionDictionaryTest.java | 70 private static void checkDictionary(final FusionDictionary dict, final ArrayList<String> words, in checkDictionary() argument 72 assertNotNull(dict); in checkDictionary() 76 final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, word); in checkDictionary() 90 private static void dumpDict(final FusionDictionary dict) { in dumpDict() argument 91 for (WordProperty wordProperty : dict) { in dumpDict() 99 final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), in testFusion() local 105 dict.add(sWords.get(i), new ProbabilityInfo(180), false, in testFusion() 107 dumpDict(dict); in testFusion() 108 checkDictionary(dict, sWords, i); in testFusion()
|
D | BinaryDictEncoderFlattenTreeTests.java | 34 final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), in testFlattenNodes() local 36 dict.add("foo", new ProbabilityInfo(1), false /* isNotAWord */, in testFlattenNodes() 38 dict.add("fta", new ProbabilityInfo(1), false /* isNotAWord */, in testFlattenNodes() 40 dict.add("ftb", new ProbabilityInfo(1), false /* isNotAWord */, in testFlattenNodes() 42 dict.add("bar", new ProbabilityInfo(1), false /* isNotAWord */, in testFlattenNodes() 44 dict.add("fool", new ProbabilityInfo(1), false /* isNotAWord */, in testFlattenNodes() 47 BinaryDictEncoderUtils.flattenTree(dict.mRootNodeArray); in testFlattenNodes()
|
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/ |
D | Info.java | 39 private static void showInfo(final FusionDictionary dict, final boolean plumbing) { in showInfo() argument 41 System.out.print(dict.mOptions.toString(2, plumbing)); in showInfo() 46 for (final WordProperty wordProperty : dict) { in showInfo() 58 private static void showWordInfo(final FusionDictionary dict, final String word) { in showWordInfo() argument 59 final PtNode ptNode = FusionDictionary.findWordInTree(dict.mRootNodeArray, word); in showWordInfo() 100 final FusionDictionary dict = BinaryDictOffdeviceUtils.getDictionary(filename, in run() local 103 showInfo(dict, plumbing); in run() 106 showWordInfo(dict, mArgs[i]); in run()
|
D | CombinedInputOutput.java | 94 final FusionDictionary dict = in readDictionaryCombined() local 109 dict.add(word, probabilityInfo, isNotAWord, isPossiblyOffensive); in readDictionaryCombined() 111 dict.setBigram(word, s.mWord, s.mProbabilityInfo); in readDictionaryCombined() 183 dict.add(word, probabilityInfo, isNotAWord, isPossiblyOffensive); in readDictionaryCombined() 185 dict.setBigram(word, s.mWord, s.mProbabilityInfo); in readDictionaryCombined() 189 return dict; in readDictionaryCombined() 199 final FusionDictionary dict) throws IOException { in writeDictionaryCombined() argument 201 for (final WordProperty wordProperty : dict) { in writeDictionaryCombined() 205 destination.write(CombinedFormatUtils.formatAttributeMap(dict.mOptions.mAttributes)); in writeDictionaryCombined()
|
D | DictionaryMaker.java | 264 private static void writeOutputToParsedArgs(final Arguments args, final FusionDictionary dict) in writeOutputToParsedArgs() argument 268 writeBinaryDictionary(args.mOutputBinary, dict, args.mOutputBinaryFormatVersion, in writeOutputToParsedArgs() 272 writeCombinedDictionary(args.mOutputCombined, dict); in writeOutputToParsedArgs() 287 final FusionDictionary dict, final int version, final int codePointTableMode) in writeBinaryDictionary() argument 298 dictEncoder.writeDictionary(dict, formatOptions); in writeBinaryDictionary() 310 final FusionDictionary dict) throws FileNotFoundException, IOException { in writeCombinedDictionary() argument 312 CombinedInputOutput.writeDictionaryCombined(writer, dict); in writeCombinedDictionary()
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/ |
D | BinaryDictOffdeviceUtilsTests.java | 87 final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), testOptions); in testGetRawDictWorks() local 88 dict.add("foo", new ProbabilityInfo(TEST_FREQ), false /* isNotAWord */, in testGetRawDictWorks() 90 dict.add("fta", new ProbabilityInfo(1), false /* isNotAWord */, in testGetRawDictWorks() 92 dict.add("ftb", new ProbabilityInfo(1), false /* isNotAWord */, in testGetRawDictWorks() 94 dict.add("bar", new ProbabilityInfo(1), false /* isNotAWord */, in testGetRawDictWorks() 96 dict.add("fool", new ProbabilityInfo(1), false /* isNotAWord */, in testGetRawDictWorks() 104 dictEncoder.writeDictionary(dict, new FormatOptions(FormatSpec.VERSION202, false)); in testGetRawDictWorks() 169 final FusionDictionary dict = new FusionDictionary(new PtNodeArray(), in runTestHeaderReaderProcessorWithOneSpec() local 174 dict.add(word, new ProbabilityInfo(TEST_FREQ), false /* isNotAWord */, in runTestHeaderReaderProcessorWithOneSpec() 180 dictEncoder.writeDictionary(dict, formatOptions); in runTestHeaderReaderProcessorWithOneSpec()
|
/packages/inputmethods/LatinIME/java/ |
D | Android.bp | 31 // Do not compress dictionary files to mmap dict data runtime 32 aaptflags: ["-0 .dict"],
|
/packages/inputmethods/LatinIME/tests/ |
D | Android.bp | 21 // Do not compress dictionary files to mmap dict data runtime 22 "-0 .dict",
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | DictionaryInfoUtils.java | 504 for (final File dict : dicts) { 505 final String wordListId = getWordListIdFromFileName(dict.getName()); 510 final AssetFileAddress fileAddress = AssetFileAddress.makeFromFile(dict);
|
/packages/apps/Launcher3/ |
D | print_db.py | 158 data = [dict(zip(columns,row)) for row in rows] 159 screenData = [dict(zip(screenCols, screenRow)) for screenRow in screenRows]
|
/packages/inputmethods/LatinIME/ |
D | build.gradle | 80 noCompress 'dict'
|