satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 1 | /* |
Ken Wakasa | 5460ea3 | 2012-07-30 16:27:44 +0900 | [diff] [blame] | 2 | * Copyright (C) 2010, The Android Open Source Project |
Ken Wakasa | 0bbb917 | 2012-07-25 17:51:43 +0900 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 16 | |
Ken Wakasa | f1008c5 | 2012-07-31 17:56:40 +0900 | [diff] [blame] | 17 | #include <cstring> |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 18 | |
satok | e808e43 | 2010-12-02 14:53:24 +0900 | [diff] [blame] | 19 | #define LOG_TAG "LatinIME: bigram_dictionary.cpp" |
| 20 | |
satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 21 | #include "bigram_dictionary.h" |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 22 | #include "binary_format.h" |
Jean Chalard | 49ba135 | 2012-05-07 20:14:00 +0900 | [diff] [blame] | 23 | #include "bloom_filter.h" |
Ken Wakasa | 3b088a2 | 2012-05-16 23:05:32 +0900 | [diff] [blame] | 24 | #include "defines.h" |
Jean Chalard | 49ba135 | 2012-05-07 20:14:00 +0900 | [diff] [blame] | 25 | #include "dictionary.h" |
satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 26 | |
| 27 | namespace latinime { |
| 28 | |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 29 | BigramDictionary::BigramDictionary(const uint8_t *const streamStart) : DICT_ROOT(streamStart) { |
Ken Wakasa | de3070a | 2011-03-19 09:16:42 +0900 | [diff] [blame] | 30 | if (DEBUG_DICT) { |
satok | 9fb6f47 | 2012-01-13 18:01:22 +0900 | [diff] [blame] | 31 | AKLOGI("BigramDictionary - constructor"); |
Ken Wakasa | de3070a | 2011-03-19 09:16:42 +0900 | [diff] [blame] | 32 | } |
satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 33 | } |
| 34 | |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 35 | BigramDictionary::~BigramDictionary() { |
satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 36 | } |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 37 | |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 38 | void BigramDictionary::addWordBigram(int *word, int length, int frequency, int *bigramFreq, |
Ken Wakasa | 1e61493 | 2012-10-29 18:06:22 +0900 | [diff] [blame] | 39 | int *bigramCodePoints, int *outputTypes) const { |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 40 | word[length] = 0; |
| 41 | if (DEBUG_DICT) { |
Doug Kwan | ce9efbf | 2011-07-07 22:53:50 -0700 | [diff] [blame] | 42 | #ifdef FLAG_DBG |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 43 | char s[length + 1]; |
Ken Wakasa | 1e61493 | 2012-10-29 18:06:22 +0900 | [diff] [blame] | 44 | for (int i = 0; i <= length; i++) s[i] = static_cast<char>(word[i]); |
satok | 9fb6f47 | 2012-01-13 18:01:22 +0900 | [diff] [blame] | 45 | AKLOGI("Bigram: Found word = %s, freq = %d :", s, frequency); |
satok | 787945b | 2011-07-14 08:32:57 +0900 | [diff] [blame] | 46 | #endif |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | // Find the right insertion point |
| 50 | int insertAt = 0; |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 51 | while (insertAt < MAX_RESULTS) { |
satok | b1ed1d4 | 2012-06-14 16:35:23 -0700 | [diff] [blame] | 52 | if (frequency > bigramFreq[insertAt] || (bigramFreq[insertAt] == frequency |
Ken Wakasa | 1e61493 | 2012-10-29 18:06:22 +0900 | [diff] [blame] | 53 | && length < Dictionary::wideStrLen( |
| 54 | bigramCodePoints + insertAt * MAX_WORD_LENGTH))) { |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 55 | break; |
| 56 | } |
| 57 | insertAt++; |
| 58 | } |
Ken Wakasa | de3070a | 2011-03-19 09:16:42 +0900 | [diff] [blame] | 59 | if (DEBUG_DICT) { |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 60 | AKLOGI("Bigram: InsertAt -> %d MAX_RESULTS: %d", insertAt, MAX_RESULTS); |
Ken Wakasa | de3070a | 2011-03-19 09:16:42 +0900 | [diff] [blame] | 61 | } |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 62 | if (insertAt >= MAX_RESULTS) { |
| 63 | return; |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 64 | } |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 65 | memmove(bigramFreq + (insertAt + 1), |
| 66 | bigramFreq + insertAt, |
| 67 | (MAX_RESULTS - insertAt - 1) * sizeof(bigramFreq[0])); |
| 68 | bigramFreq[insertAt] = frequency; |
| 69 | outputTypes[insertAt] = Dictionary::KIND_PREDICTION; |
| 70 | memmove(bigramCodePoints + (insertAt + 1) * MAX_WORD_LENGTH, |
| 71 | bigramCodePoints + insertAt * MAX_WORD_LENGTH, |
| 72 | (MAX_RESULTS - insertAt - 1) * sizeof(bigramCodePoints[0]) * MAX_WORD_LENGTH); |
| 73 | int *dest = bigramCodePoints + insertAt * MAX_WORD_LENGTH; |
| 74 | while (length--) { |
| 75 | *dest++ = *word++; |
| 76 | } |
| 77 | *dest = 0; // NULL terminate |
| 78 | if (DEBUG_DICT) { |
| 79 | AKLOGI("Bigram: Added word at %d", insertAt); |
| 80 | } |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 81 | } |
| 82 | |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 83 | /* Parameters : |
| 84 | * prevWord: the word before, the one for which we need to look up bigrams. |
| 85 | * prevWordLength: its length. |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 86 | * inputCodePoints: what user typed, in the same format as for UnigramDictionary::getSuggestions. |
| 87 | * inputSize: the size of the codes array. |
Ken Wakasa | 1e61493 | 2012-10-29 18:06:22 +0900 | [diff] [blame] | 88 | * bigramCodePoints: an array for output, at the same format as outwords for getSuggestions. |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 89 | * bigramFreq: an array to output frequencies. |
Jean Chalard | 6931df9 | 2012-07-12 12:55:48 +0900 | [diff] [blame] | 90 | * outputTypes: an array to output types. |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 91 | * This method returns the number of bigrams this word has, for backward compatibility. |
| 92 | * Note: this is not the number of bigrams output in the array, which is the number of |
| 93 | * bigrams this word has WHOSE first letter also matches the letter the user typed. |
| 94 | * TODO: this may not be a sensible thing to do. It makes sense when the bigrams are |
| 95 | * used to match the first letter of the second word, but once the user has typed more |
| 96 | * and the bigrams are used to boost unigram result scores, it makes little sense to |
| 97 | * reduce their scope to the ones that match the first letter. |
| 98 | */ |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 99 | int BigramDictionary::getBigrams(const int *prevWord, int prevWordLength, int *inputCodePoints, |
| 100 | int inputSize, int *bigramCodePoints, int *bigramFreq, int *outputTypes) const { |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 101 | // TODO: remove unused arguments, and refrain from storing stuff in members of this class |
| 102 | // TODO: have "in" arguments before "out" ones, and make out args explicit in the name |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 103 | |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 104 | const uint8_t *const root = DICT_ROOT; |
Jean Chalard | e9a86e2 | 2012-06-28 21:01:29 +0900 | [diff] [blame] | 105 | int pos = getBigramListPositionForWord(prevWord, prevWordLength, |
| 106 | false /* forceLowerCaseSearch */); |
Jean Chalard | 351864b | 2012-04-24 18:06:51 +0900 | [diff] [blame] | 107 | // getBigramListPositionForWord returns 0 if this word isn't in the dictionary or has no bigrams |
Jean Chalard | e9a86e2 | 2012-06-28 21:01:29 +0900 | [diff] [blame] | 108 | if (0 == pos) { |
| 109 | // If no bigrams for this exact word, search again in lower case. |
| 110 | pos = getBigramListPositionForWord(prevWord, prevWordLength, |
| 111 | true /* forceLowerCaseSearch */); |
| 112 | } |
| 113 | // If still no bigrams, we really don't have them! |
Jean Chalard | ee396df | 2012-04-17 16:02:35 +0900 | [diff] [blame] | 114 | if (0 == pos) return 0; |
Ken Wakasa | d86d313 | 2012-09-04 20:29:38 +0900 | [diff] [blame] | 115 | uint8_t bigramFlags; |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 116 | int bigramCount = 0; |
| 117 | do { |
| 118 | bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos); |
Ken Wakasa | 1e61493 | 2012-10-29 18:06:22 +0900 | [diff] [blame] | 119 | int bigramBuffer[MAX_WORD_LENGTH]; |
Jean Chalard | 62cd919 | 2012-05-30 14:46:43 +0900 | [diff] [blame] | 120 | int unigramFreq = 0; |
Jean Chalard | 588e2f2 | 2011-07-25 14:03:19 +0900 | [diff] [blame] | 121 | const int bigramPos = BinaryFormat::getAttributeAddressAndForwardPointer(root, bigramFlags, |
| 122 | &pos); |
| 123 | const int length = BinaryFormat::getWordAtAddress(root, bigramPos, MAX_WORD_LENGTH, |
Jean Chalard | e308459 | 2012-05-29 16:22:46 +0900 | [diff] [blame] | 124 | bigramBuffer, &unigramFreq); |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 125 | |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 126 | // inputSize == 0 means we are trying to find bigram predictions. |
| 127 | if (inputSize < 1 || checkFirstCharacter(bigramBuffer, inputCodePoints)) { |
Jean Chalard | 1956050 | 2012-07-31 23:45:32 +0900 | [diff] [blame] | 128 | const int bigramFreqTemp = BinaryFormat::MASK_ATTRIBUTE_FREQUENCY & bigramFlags; |
Jean Chalard | 46fe49f | 2012-05-29 16:50:25 +0900 | [diff] [blame] | 129 | // Due to space constraints, the frequency for bigrams is approximate - the lower the |
| 130 | // unigram frequency, the worse the precision. The theoritical maximum error in |
| 131 | // resulting frequency is 8 - although in the practice it's never bigger than 3 or 4 |
| 132 | // in very bad cases. This means that sometimes, we'll see some bigrams interverted |
| 133 | // here, but it can't get too bad. |
Jean Chalard | e308459 | 2012-05-29 16:22:46 +0900 | [diff] [blame] | 134 | const int frequency = |
satok | b1ed1d4 | 2012-06-14 16:35:23 -0700 | [diff] [blame] | 135 | BinaryFormat::computeFrequencyForBigram(unigramFreq, bigramFreqTemp); |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 136 | addWordBigram(bigramBuffer, length, frequency, bigramFreq, bigramCodePoints, |
| 137 | outputTypes); |
| 138 | ++bigramCount; |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 139 | } |
Jean Chalard | 1956050 | 2012-07-31 23:45:32 +0900 | [diff] [blame] | 140 | } while (BinaryFormat::FLAG_ATTRIBUTE_HAS_NEXT & bigramFlags); |
Ken Wakasa | f6870cc | 2013-01-11 18:59:01 +0900 | [diff] [blame] | 141 | return min(bigramCount, MAX_RESULTS); |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 142 | } |
| 143 | |
Jean Chalard | ee396df | 2012-04-17 16:02:35 +0900 | [diff] [blame] | 144 | // Returns a pointer to the start of the bigram list. |
| 145 | // If the word is not found or has no bigrams, this function returns 0. |
Ken Wakasa | aa5a3e8 | 2012-12-03 19:54:30 +0900 | [diff] [blame] | 146 | int BigramDictionary::getBigramListPositionForWord(const int *prevWord, const int prevWordLength, |
| 147 | const bool forceLowerCaseSearch) const { |
Jean Chalard | 1ff8dc4 | 2012-05-02 16:00:24 +0900 | [diff] [blame] | 148 | if (0 >= prevWordLength) return 0; |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 149 | const uint8_t *const root = DICT_ROOT; |
Jean Chalard | e9a86e2 | 2012-06-28 21:01:29 +0900 | [diff] [blame] | 150 | int pos = BinaryFormat::getTerminalPosition(root, prevWord, prevWordLength, |
| 151 | forceLowerCaseSearch); |
Jean Chalard | 9c2a96a | 2012-04-17 11:38:44 +0900 | [diff] [blame] | 152 | |
| 153 | if (NOT_VALID_WORD == pos) return 0; |
Ken Wakasa | d86d313 | 2012-09-04 20:29:38 +0900 | [diff] [blame] | 154 | const uint8_t flags = BinaryFormat::getFlagsAndForwardPointer(root, &pos); |
Jean Chalard | 1956050 | 2012-07-31 23:45:32 +0900 | [diff] [blame] | 155 | if (0 == (flags & BinaryFormat::FLAG_HAS_BIGRAMS)) return 0; |
| 156 | if (0 == (flags & BinaryFormat::FLAG_HAS_MULTIPLE_CHARS)) { |
Ken Wakasa | f278981 | 2012-09-04 12:49:46 +0900 | [diff] [blame] | 157 | BinaryFormat::getCodePointAndForwardPointer(root, &pos); |
Jean Chalard | 9c2a96a | 2012-04-17 11:38:44 +0900 | [diff] [blame] | 158 | } else { |
| 159 | pos = BinaryFormat::skipOtherCharacters(root, pos); |
| 160 | } |
Jean Chalard | 9c2a96a | 2012-04-17 11:38:44 +0900 | [diff] [blame] | 161 | pos = BinaryFormat::skipFrequency(flags, pos); |
Jean Chalard | 402b057 | 2012-05-29 15:56:30 +0900 | [diff] [blame] | 162 | pos = BinaryFormat::skipChildrenPosition(flags, pos); |
Jean Chalard | 9c2a96a | 2012-04-17 11:38:44 +0900 | [diff] [blame] | 163 | pos = BinaryFormat::skipShortcuts(root, flags, pos); |
| 164 | return pos; |
| 165 | } |
| 166 | |
Ken Wakasa | aa5a3e8 | 2012-12-03 19:54:30 +0900 | [diff] [blame] | 167 | void BigramDictionary::fillBigramAddressToFrequencyMapAndFilter(const int *prevWord, |
satok | b1ed1d4 | 2012-06-14 16:35:23 -0700 | [diff] [blame] | 168 | const int prevWordLength, std::map<int, int> *map, uint8_t *filter) const { |
Jean Chalard | f1634c8 | 2012-05-02 19:05:27 +0900 | [diff] [blame] | 169 | memset(filter, 0, BIGRAM_FILTER_BYTE_SIZE); |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 170 | const uint8_t *const root = DICT_ROOT; |
Jean Chalard | e9a86e2 | 2012-06-28 21:01:29 +0900 | [diff] [blame] | 171 | int pos = getBigramListPositionForWord(prevWord, prevWordLength, |
| 172 | false /* forceLowerCaseSearch */); |
| 173 | if (0 == pos) { |
| 174 | // If no bigrams for this exact string, search again in lower case. |
| 175 | pos = getBigramListPositionForWord(prevWord, prevWordLength, |
| 176 | true /* forceLowerCaseSearch */); |
| 177 | } |
Jean Chalard | 1ff8dc4 | 2012-05-02 16:00:24 +0900 | [diff] [blame] | 178 | if (0 == pos) return; |
| 179 | |
Ken Wakasa | d86d313 | 2012-09-04 20:29:38 +0900 | [diff] [blame] | 180 | uint8_t bigramFlags; |
Jean Chalard | 1ff8dc4 | 2012-05-02 16:00:24 +0900 | [diff] [blame] | 181 | do { |
| 182 | bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos); |
Jean Chalard | 1956050 | 2012-07-31 23:45:32 +0900 | [diff] [blame] | 183 | const int frequency = BinaryFormat::MASK_ATTRIBUTE_FREQUENCY & bigramFlags; |
Jean Chalard | 1ff8dc4 | 2012-05-02 16:00:24 +0900 | [diff] [blame] | 184 | const int bigramPos = BinaryFormat::getAttributeAddressAndForwardPointer(root, bigramFlags, |
| 185 | &pos); |
| 186 | (*map)[bigramPos] = frequency; |
Jean Chalard | f1634c8 | 2012-05-02 19:05:27 +0900 | [diff] [blame] | 187 | setInFilter(filter, bigramPos); |
Jean Chalard | 1956050 | 2012-07-31 23:45:32 +0900 | [diff] [blame] | 188 | } while (0 != (BinaryFormat::FLAG_ATTRIBUTE_HAS_NEXT & bigramFlags)); |
Jean Chalard | 1ff8dc4 | 2012-05-02 16:00:24 +0900 | [diff] [blame] | 189 | } |
| 190 | |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 191 | bool BigramDictionary::checkFirstCharacter(int *word, int *inputCodePoints) const { |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 192 | // Checks whether this word starts with same character or neighboring characters of |
| 193 | // what user typed. |
| 194 | |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 195 | int maxAlt = MAX_ALTERNATIVES; |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 196 | const int firstBaseLowerCodePoint = toBaseLowerCase(*word); |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 197 | while (maxAlt > 0) { |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 198 | if (toBaseLowerCase(*inputCodePoints) == firstBaseLowerCodePoint) { |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 199 | return true; |
| 200 | } |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 201 | inputCodePoints++; |
satok | 18c28f4 | 2010-12-02 18:11:54 +0900 | [diff] [blame] | 202 | maxAlt--; |
| 203 | } |
| 204 | return false; |
| 205 | } |
| 206 | |
Ken Wakasa | aa5a3e8 | 2012-12-03 19:54:30 +0900 | [diff] [blame] | 207 | bool BigramDictionary::isValidBigram(const int *word1, int length1, const int *word2, |
satok | b1ed1d4 | 2012-06-14 16:35:23 -0700 | [diff] [blame] | 208 | int length2) const { |
Ken Wakasa | 5db594a | 2013-01-12 01:18:00 +0900 | [diff] [blame^] | 209 | const uint8_t *const root = DICT_ROOT; |
Jean Chalard | e9a86e2 | 2012-06-28 21:01:29 +0900 | [diff] [blame] | 210 | int pos = getBigramListPositionForWord(word1, length1, false /* forceLowerCaseSearch */); |
Tom Ouyang | 4d289d3 | 2012-04-26 23:50:21 -0700 | [diff] [blame] | 211 | // getBigramListPositionForWord returns 0 if this word isn't in the dictionary or has no bigrams |
| 212 | if (0 == pos) return false; |
Jean Chalard | e9a86e2 | 2012-06-28 21:01:29 +0900 | [diff] [blame] | 213 | int nextWordPos = BinaryFormat::getTerminalPosition(root, word2, length2, |
| 214 | false /* forceLowerCaseSearch */); |
Tom Ouyang | 4d289d3 | 2012-04-26 23:50:21 -0700 | [diff] [blame] | 215 | if (NOT_VALID_WORD == nextWordPos) return false; |
Ken Wakasa | d86d313 | 2012-09-04 20:29:38 +0900 | [diff] [blame] | 216 | uint8_t bigramFlags; |
Tom Ouyang | 4d289d3 | 2012-04-26 23:50:21 -0700 | [diff] [blame] | 217 | do { |
| 218 | bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos); |
| 219 | const int bigramPos = BinaryFormat::getAttributeAddressAndForwardPointer(root, bigramFlags, |
| 220 | &pos); |
| 221 | if (bigramPos == nextWordPos) { |
| 222 | return true; |
| 223 | } |
Jean Chalard | 1956050 | 2012-07-31 23:45:32 +0900 | [diff] [blame] | 224 | } while (BinaryFormat::FLAG_ATTRIBUTE_HAS_NEXT & bigramFlags); |
Tom Ouyang | 4d289d3 | 2012-04-26 23:50:21 -0700 | [diff] [blame] | 225 | return false; |
| 226 | } |
| 227 | |
satok | 3008825 | 2010-12-01 21:22:15 +0900 | [diff] [blame] | 228 | // TODO: Move functions related to bigram to here |
| 229 | } // namespace latinime |