/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
UserHistoryDictIOUtils.java | 74 final BigramDictionaryInterface dict, final UserHistoryDictionaryBigramList bigrams, 76 final FusionDictionary fusionDict = constructFusionDictionary(dict, bigrams); 95 final BigramDictionaryInterface dict, final UserHistoryDictionaryBigramList bigrams) { 100 for (final String word1 : bigrams.keySet()) { 101 final HashMap<String, Byte> word1Bigrams = bigrams.getBigrams(word1); 125 bigrams.updateBigram(word1, word2, (byte)freq); 141 final TreeMap<Integer, ArrayList<PendingAttribute>> bigrams = CollectionUtils.newTreeMap(); local 143 dictDecoder.readUnigramsAndBigramsBinary(unigrams, frequencies, bigrams); 151 addWordsFromWordMap(unigrams, frequencies, bigrams, dict); 155 * Adds all unigrams and bigrams in maps to OnAddWordListener [all...] |
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/ |
multi_bigram_map.cpp | 25 // usage. Also, there are diminishing returns since the most frequently used bigrams are 27 // that these bigrams are reset for each new composing word. 30 // Most common previous word contexts currently have 100 bigrams
|
bigram_dictionary.cpp | 88 * prevWord: the word before, the one for which we need to look up bigrams. 93 * This method returns the number of bigrams this word has, for backward compatibility. 103 // getBigramListPositionForWord returns 0 if this word isn't in the dictionary or has no bigrams 105 // If no bigrams for this exact word, search again in lower case. 109 // If still no bigrams, we really don't have them! 128 // Due to space constraints, the probability for bigrams is approximate - the lower the 131 // in very bad cases. This means that sometimes, we'll see some bigrams interverted 143 // If the word is not found or has no bigrams, this function returns NOT_A_DICT_POS. 156 // getBigramListPositionForWord returns 0 if this word isn't in the dictionary or has no bigrams
|
bloom_filter.h | 53 // Size, in bytes, of the bloom filter index for bigrams 55 // where k is the number of hash functions, n the number of bigrams, and m the number of 57 // At the moment 100 is the maximum number of bigrams for a word with the current
|
multi_bigram_map.h | 31 // algorithm needs to look up the set of bigrams for every word pair that occurs in every 39 // Also caches the bigrams if there is space remaining and they have not been cached already.
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/ |
PtNodeInfo.java | 41 final ArrayList<PendingAttribute> bigrams) { 50 mBigrams = bigrams;
|
Ver3DictDecoder.java | 166 final ArrayList<PendingAttribute> bigrams; local 168 bigrams = new ArrayList<PendingAttribute>(); 169 addressPointer += PtNodeReader.readBigramAddresses(mDictBuffer, bigrams, 171 if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { 172 throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size() 176 bigrams = null; 179 parentAddress, childrenAddress, shortcutTargets, bigrams); 267 throw new RuntimeException("Too many bigrams in a PtNode.");
|
Ver4DictDecoder.java | 240 final ArrayList<PendingAttribute> bigrams; local 242 bigrams = new ArrayList<PendingAttribute>(); 245 while (bigrams.size() < FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { 246 // If bigrams.size() reaches FormatSpec.MAX_BIGRAMS_IN_A_PTNODE, 253 bigrams.add(new PendingAttribute( 258 if (bigrams.size() >= FormatSpec.MAX_BIGRAMS_IN_A_PTNODE) { 259 throw new RuntimeException("Too many bigrams in a PtNode (" + bigrams.size() 263 bigrams = null; 266 parentAddress, childrenAddress, shortcutTargets, bigrams); [all...] |
DynamicBinaryDictIOUtils.java | 188 * @param bigrams the bigrams for this PtNode. 200 final ArrayList<PendingAttribute> bigrams, final OutputStream destination, 208 shortcutTargets, bigrams); 213 bigrams); 241 final ArrayList<PendingAttribute> bigrams = new ArrayList<PendingAttribute>(); local 249 bigrams.add(new PendingAttribute(bigram.mFrequency, position)); 255 final boolean hasBigrams = !bigrams.isEmpty(); 300 frequency, nodeParentAddress, shortcuts, bigrams, destination, 376 FormatSpec.NO_CHILDREN_ADDRESS, shortcuts, bigrams); [all...] |
AbstractDictDecoder.java | 79 final TreeMap<Integer, ArrayList<PendingAttribute>> bigrams) 84 BinaryDictIOUtils.readUnigramsAndBigramsBinary(this, words, frequencies, bigrams); 173 final ArrayList<PendingAttribute> bigrams, final int baseAddress) { 196 throw new RuntimeException("Has bigrams with no address"); 198 bigrams.add(new PendingAttribute(
|
Word.java | 41 final ArrayList<WeightedString> bigrams, 46 mBigrams = bigrams;
|
FusionDictionary.java | 96 * PtNode is a group of characters, with a frequency, shortcut targets, bigrams, and children 106 * bigrams, but a non-terminal may not. Moreover, children, if present, are null. 129 final ArrayList<WeightedString> bigrams, final int frequency, 135 mBigrams = bigrams; 142 final ArrayList<WeightedString> bigrams, final int frequency, 148 mBigrams = bigrams; 238 * Returns null if the word is not in the bigrams list. 260 final ArrayList<WeightedString> bigrams, 281 if (bigrams != null) { 283 mBigrams = bigrams; [all...] |
Ver3DictEncoder.java | 211 * @param bigrams the bigram attributes list. 214 private void writeBigrams(final ArrayList<WeightedString> bigrams, 216 if (bigrams == null) return; 218 final Iterator<WeightedString> bigramIterator = bigrams.iterator();
|
DictDecoder.java | 84 * Reads unigrams and bigrams from the binary file. 89 * @param bigrams the map to store the address as a key and the list of address as a value. 96 final TreeMap<Integer, ArrayList<PendingAttribute>> bigrams)
|
/packages/inputmethods/LatinIME/tests/data/ |
bigramlist.xml | 21 <bigrams> 36 </bigrams>
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/policy/ |
dictionary_bigrams_structure_policy.h | 25 * This class abstracts structure of bigrams.
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
BinaryDictDecoderEncoderTests.java | 163 final SparseArray<List<Integer>> bigrams) { 164 for (int i = 0; i < bigrams.size(); ++i) { 165 final int w1 = bigrams.keyAt(i); 166 for (int w2 : bigrams.valueAt(i)) { 204 final SparseArray<List<Integer>> bigrams, 215 for (int i = 0; i < bigrams.size(); ++i) { 216 final int w1 = bigrams.keyAt(i); 217 for (final int w2 : bigrams.valueAt(i)) { 280 final SparseArray<List<Integer>> bigrams, 298 checkDictionary(dict, words, bigrams, shortcutMap) [all...] |
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/ |
Info.java | 91 final ArrayList<WeightedString> bigrams = ptNode.getBigrams(); local 92 if (null == bigrams || bigrams.isEmpty()) { 93 System.out.println(" No bigrams"); 95 for (final WeightedString bigram : bigrams) {
|
CombinedInputOutput.java | 127 ArrayList<WeightedString> bigrams = new ArrayList<WeightedString>(); local 135 for (WeightedString s : bigrams) { 140 if (!bigrams.isEmpty()) bigrams = new ArrayList<WeightedString>(); 185 bigrams.add(new WeightedString(secondWordOfBigram, bigramFreq)); 193 for (WeightedString s : bigrams) {
|
DictionaryMaker.java | 98 throw new RuntimeException("Separate bigrams/shortcut files are only supported" 99 + " with XML input (other formats include bigrams and shortcuts already)"); 127 + "[-s <unigrams.xml> [-b <bigrams.xml>] [-c <shortcuts_and_whitelist.xml>] " 134 + " Source can be an XML file, with an optional XML bigrams file, or a\n" 305 * @param bigramXmlFilename the name of the bigram XML file. Pass null if there are no bigrams. 318 final FileInputStream bigrams = null == bigramXmlFilename ? null : local 320 return XmlDictInputOutput.readDictionaryXml(unigrams, shortcuts, bigrams);
|
XmlDictInputOutput.java | 302 * @param bigrams the file to read the bigrams from, or null. 306 final InputStream shortcuts, final InputStream bigrams) 312 if (null != bigrams) parser.parse(bigrams, bigramHandler); 339 * which has no support for bigrams or shortcuts/whitelist. 350 * The output format is the "second" format, which supports bigrams and shortcuts/whitelist.
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/ |
UserHistoryDictionaryBigramList.java | 28 * A store of bigrams which will be updated when the user history dictionary is closed 29 * All bigrams including stale ones in SQL DB should be stored in this class to avoid adding stale 30 * bigrams when we write to the SQL DB.
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
UserHistoryDictIOUtilsTests.java | 57 * Return same frequency for all words and bigrams 102 final HashMap<String, ArrayList<String> > bigrams) { 103 for (final String word : bigrams.keySet()) { 104 if (bigrams.containsKey(word)) { 105 checkWordInFusionDict(dict, word, bigrams.get(word)); 119 // check bigrams
|
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/ |
dic_node_utils.h | 51 // Max number of bigrams to look up
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
BinaryDictionaryDecayingTests.java | 128 // Add bigrams of not valid unigrams. 263 final ArrayList<Pair<String, String>> bigrams = new ArrayList<Pair<String, String>>(); local 278 bigrams.add(bigram); 284 final Pair<String, String> bigram = bigrams.get(random.nextInt(bigrams.size()));
|