/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | UserHistoryDictionaryBigramList.java | 44 public void addBigram(String word1, String word2) { in addBigram() argument 45 addBigram(word1, word2, FORGETTING_CURVE_INITIAL_VALUE); in addBigram() 51 public void addBigram(String word1, String word2, byte fcValue) { in addBigram() argument 53 Log.d(TAG, "--- add bigram: " + word1 + ", " + word2 + ", " + fcValue); in addBigram() 56 if (mBigramMap.containsKey(word1)) { in addBigram() 57 map = mBigramMap.get(word1); in addBigram() 60 mBigramMap.put(word1, map); in addBigram() 71 public void updateBigram(String word1, String word2, byte fcValue) { in updateBigram() argument 73 Log.d(TAG, "--- update bigram: " + word1 + ", " + word2 + ", " + fcValue); in updateBigram() 76 if (mBigramMap.containsKey(word1)) { in updateBigram() [all …]
|
D | UserHistoryDictionary.java | 148 public int addToUserHistory(final String word1, String word2, boolean isValid) { in addToUserHistory() argument 150 (word1 != null && word1.length() >= BinaryDictionary.MAX_WORD_LENGTH)) { in addToUserHistory() 159 if (word2.equals(word1)) { in addToUserHistory() 163 if (null == word1) { in addToUserHistory() 167 word1, word2, new ForgettingCurveParams(isValid)); in addToUserHistory() 169 mBigramList.addBigram(word1, word2); in addToUserHistory() 178 public boolean cancelAddingUserHistory(String word1, String word2) { in cancelAddingUserHistory() argument 181 if (mBigramList.removeBigram(word1, word2)) { in cancelAddingUserHistory() 182 return super.removeBigram(word1, word2); in cancelAddingUserHistory() 239 public void setBigram(String word1, String word2, int frequency) { in loadDictionaryAsyncLocked() [all …]
|
D | UserHistoryDictIOUtils.java | 47 public void setBigram(final String word1, final String word2, final int frequency); in setBigram() argument 51 public int getFrequency(final String word1, final String word2); in getFrequency() argument 138 for (final String word1 : bigrams.keySet()) { in constructFusionDictionary() 139 final HashMap<String, Byte> word1Bigrams = bigrams.getBigrams(word1); in constructFusionDictionary() 141 final int freq = dict.getFrequency(word1, word2); in constructFusionDictionary() 147 if (word1 == null) { in constructFusionDictionary() 150 Log.d(TAG, "add bigram: " + word1 in constructFusionDictionary() 155 if (word1 == null) { // unigram in constructFusionDictionary() 158 if (FusionDictionary.findWordInTree(fusionDict.mRoot, word1) == null) { in constructFusionDictionary() 159 fusionDict.add(word1, 2, null, false /* isNotAWord */); in constructFusionDictionary() [all …]
|
D | ExpandableBinaryDictionary.java | 237 protected boolean isValidBigram(final CharSequence word1, final CharSequence word2) { in isValidBigram() argument 239 return mBinaryDictionary.isValidBigram(word1, word2); in isValidBigram() 242 protected boolean isValidBigramInner(final CharSequence word1, final CharSequence word2) { in isValidBigramInner() argument 245 return isValidBigramLocked(word1, word2); in isValidBigramInner() 253 protected boolean isValidBigramLocked(final CharSequence word1, final CharSequence word2) { in isValidBigramLocked() argument 255 return mBinaryDictionary.isValidBigram(word1, word2); in isValidBigramLocked()
|
D | ExpandableDictionary.java | 323 protected boolean removeBigram(String word1, String word2) { 325 final Node firstWord = searchWord(mRoots, word1.toLowerCase(), 0, null); 354 protected NextWord getBigramWord(String word1, String word2) { 356 final Node firstWord = searchWord(mRoots, word1.toLowerCase(), 0, null); 527 public int setBigramAndGetFrequency(String word1, String word2, int frequency) { in setBigramAndGetFrequency() argument 528 return setBigramAndGetFrequency(word1, word2, frequency, null /* unused */); in setBigramAndGetFrequency() 531 public int setBigramAndGetFrequency(String word1, String word2, ForgettingCurveParams fcp) { in setBigramAndGetFrequency() argument 532 return setBigramAndGetFrequency(word1, word2, 0 /* unused */, fcp); in setBigramAndGetFrequency() 544 String word1, String word2, int frequency, ForgettingCurveParams fcp) { in setBigramAndGetFrequency() argument 549 Node firstWord = searchWord(mRoots, word1.toLowerCase(), 0, null); in setBigramAndGetFrequency()
|
D | BinaryDictionary.java | 113 private native boolean isValidBigramNative(long dict, int[] word1, int[] word2); in isValidBigramNative() argument 210 public boolean isValidBigram(CharSequence word1, CharSequence word2) { in isValidBigram() argument 211 if (TextUtils.isEmpty(word1) || TextUtils.isEmpty(word2)) return false; in isValidBigram() 212 int[] chars1 = StringUtils.toCodePointArray(word1.toString()); in isValidBigram()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | UserHistoryDictIOUtilsTests.java | 55 public int getFrequency(String word1, String word2) { in getFrequency() argument 56 if (word1 == null) return UNIGRAM_FREQUENCY; in getFrequency() 69 private void addBigram(final String word1, final String word2, in addBigram() argument 71 addWord(word1, addedWords); in addBigram() 73 addedWords.get(word1).add(word2); in addBigram() 76 private void addBigramToBigramList(final String word1, final String word2, in addBigramToBigramList() argument 79 bigramList.addBigram(null, word1); in addBigramToBigramList() 80 bigramList.addBigram(word1, word2); in addBigramToBigramList() 82 addBigram(word1, word2, addedWords); in addBigramToBigramList() 218 public void setBigram(final String word1, final String word2, final int frequency) { in testReadAndWrite() [all …]
|
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/JAJP/ |
D | UserDictionaryToolsListJAJP.java | 68 public int compare(WnnWord word1, WnnWord word2) { in compare() argument 69 return word1.stroke.compareTo(word2.stroke); in compare()
|
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/EN/ |
D | UserDictionaryToolsListEN.java | 71 public int compare(WnnWord word1, WnnWord word2) { in compare() argument 72 return word1.stroke.compareTo(word2.stroke); in compare()
|
/packages/inputmethods/LatinIME/native/jni/src/ |
D | dictionary.cpp | 97 bool Dictionary::isValidBigram(const int32_t *word1, int length1, const int32_t *word2, in isValidBigram() argument 99 return mBigramDictionary->isValidBigram(word1, length1, word2, length2); in isValidBigram()
|
D | bigram_dictionary.cpp | 209 bool BigramDictionary::isValidBigram(const int32_t *word1, int length1, const int32_t *word2, in isValidBigram() argument 212 int pos = getBigramListPositionForWord(word1, length1, false /* forceLowerCaseSearch */); in isValidBigram()
|
D | bigram_dictionary.h | 34 bool isValidBigram(const int32_t *word1, int length1, const int32_t *word2, int length2) const;
|
D | dictionary.h | 57 bool isValidBigram(const int32_t *word1, int length1, const int32_t *word2, int length2) const;
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictIOTests.java | 346 final String word1 = expectedWords.get(expectedBigrams.keyAt(i)); in checkWordMap() local 348 if (expBigrams.get(word1) == null) { in checkWordMap() 349 expBigrams.put(word1, new ArrayList<String>()); in checkWordMap() 351 expBigrams.get(word1).add(expectedWords.get(w2)); in checkWordMap() 357 final String word1 = resultWords.get(entry.getKey()); in checkWordMap() local 361 if (actBigrams.get(word1) == null) { in checkWordMap() 362 actBigrams.put(word1, new ArrayList<String>()); in checkWordMap() 364 actBigrams.get(word1).add(word2); in checkWordMap()
|
/packages/apps/Email/src/org/apache/james/mime4j/codec/ |
D | EncoderUtil.java | 525 String word1 = encodeB(prefix, part1, usedCharacters, charset, in encodeB() local 532 return word1 + " " + word2; in encodeB() 553 String word1 = encodeQ(prefix, part1, usage, usedCharacters, in encodeQ() local 560 return word1 + " " + word2; in encodeQ()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/ |
D | FusionDictionary.java | 354 public void setBigram(final String word1, final String word2, final int frequency) { in setBigram() argument 355 CharGroup charGroup = findWordInTree(mRoot, word1); in setBigram()
|