Home
last modified time | relevance | path

Searched refs:bigrams (Results 1 – 11 of 11) sorted by relevance

/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictDecoderEncoderTests.java143 final SparseArray<List<Integer>> bigrams) { in addBigrams() argument
144 for (int i = 0; i < bigrams.size(); ++i) { in addBigrams()
145 final int w1 = bigrams.keyAt(i); in addBigrams()
146 for (int w2 : bigrams.valueAt(i)) { in addBigrams()
184 final SparseArray<List<Integer>> bigrams) { in checkDictionary() argument
194 for (int i = 0; i < bigrams.size(); ++i) { in checkDictionary()
195 final int w1 = bigrams.keyAt(i); in checkDictionary()
196 for (final int w2 : bigrams.valueAt(i)) { in checkDictionary()
214 final SparseArray<List<Integer>> bigrams, final int bufferType) { in timeReadingAndCheckDict() argument
230 checkDictionary(dict, words, bigrams); in timeReadingAndCheckDict()
[all …]
DFusionDictionary.java102 public PtNode(final int[] chars, final ArrayList<WeightedString> bigrams, in PtNode() argument
108 mBigrams = bigrams; in PtNode()
114 public PtNode(final int[] chars, final ArrayList<WeightedString> bigrams, in PtNode() argument
119 mBigrams = bigrams; in PtNode()
205 final ArrayList<WeightedString> bigrams, in update() argument
208 if (bigrams != null) { in update()
210 mBigrams = bigrams; in update()
212 final int size = bigrams.size(); in update()
214 final WeightedString bigram = bigrams.get(i); in update()
DBinaryDictIOUtils.java80 final Map<Integer, ArrayList<PendingAttribute>> bigrams) { in readUnigramsAndBigramsBinaryInner() argument
119 bigrams.put(ptNodeInfo.mOriginalAddress, ptNodeInfo.mBigrams); in readUnigramsAndBigramsBinaryInner()
150 final Map<Integer, ArrayList<PendingAttribute>> bigrams) throws IOException, in readUnigramsAndBigramsBinary() argument
155 frequencies, bigrams); in readUnigramsAndBigramsBinary()
DPtNodeInfo.java37 final ArrayList<PendingAttribute> bigrams) { in PtNodeInfo() argument
45 mBigrams = bigrams; in PtNodeInfo()
DAbstractDictDecoder.java46 final TreeMap<Integer, ArrayList<PendingAttribute>> bigrams) in readUnigramsAndBigramsBinary() argument
51 BinaryDictIOUtils.readUnigramsAndBigramsBinary(this, words, frequencies, bigrams); in readUnigramsAndBigramsBinary()
DVer2DictEncoder.java248 private void writeBigrams(final ArrayList<WeightedString> bigrams, in writeBigrams() argument
250 if (bigrams == null) return; in writeBigrams()
252 final Iterator<WeightedString> bigramIterator = bigrams.iterator(); in writeBigrams()
DDictDecoder.java91 final TreeMap<Integer, ArrayList<PendingAttribute>> bigrams) in readUnigramsAndBigramsBinary() argument
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/makedict/
DWordProperty.java52 @Nullable final ArrayList<WeightedString> bigrams, in WordProperty() argument
56 if (null == bigrams) { in WordProperty()
61 for (final WeightedString bigramTarget : bigrams) { in WordProperty()
68 mHasNgrams = bigrams != null && !bigrams.isEmpty(); in WordProperty()
123 final ArrayList<WeightedString> bigrams = new ArrayList<>(); in getBigrams() local
126 bigrams.add(ngram.mTargetWord); in getBigrams()
129 return bigrams; in getBigrams()
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/
DCombinedInputOutput.java102 ArrayList<WeightedString> bigrams = new ArrayList<>(); in readDictionaryCombined() local
110 for (WeightedString s : bigrams) { in readDictionaryCombined()
115 if (!bigrams.isEmpty()) bigrams = new ArrayList<>(); in readDictionaryCombined()
176 bigrams.add(new WeightedString(secondWordOfBigram, bigramProbabilityInfo)); in readDictionaryCombined()
184 for (WeightedString s : bigrams) { in readDictionaryCombined()
DInfo.java72 final ArrayList<WeightedString> bigrams = ptNode.getBigrams(); in showWordInfo() local
73 if (null == bigrams || bigrams.isEmpty()) { in showWordInfo()
76 for (final WeightedString bigram : bigrams) { in showWordInfo()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DBinaryDictionaryTests.java673 final HashSet<Pair<String, String>> bigrams = new HashSet<>(); in testUnigramAndBigramCount() local
691 bigrams.add(new Pair<>(word0, word1)); in testUnigramAndBigramCount()
698 assertEquals(new HashSet<>(bigrams).size(), Integer.parseInt( in testUnigramAndBigramCount()
705 assertEquals(new HashSet<>(bigrams).size(), Integer.parseInt( in testUnigramAndBigramCount()
729 final HashMap<String, HashSet<String>> bigrams = new HashMap<>(); in testGetWordProperties() local
771 if (!bigrams.containsKey(word0)) { in testGetWordProperties()
773 bigrams.put(word0, bigramWord1s); in testGetWordProperties()
775 bigrams.get(word0).add(word1); in testGetWordProperties()
781 if (!bigrams.containsKey(word0)) { in testGetWordProperties()
784 final HashSet<String> bigramWord1s = bigrams.get(word0); in testGetWordProperties()
[all …]