aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/dictionary.h
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-02-22 17:28:55 +0900
committersatok <satok@google.com>2011-02-23 23:04:00 +0900
commit8fbd55229243cb66c03d5ea1f79dfb39f596590d (patch)
tree5415af2a34bb5d362802e06a43b7ba576138c86d /native/src/dictionary.h
parentedb722abefaa56708cd1d3ee617e35e5ed2f7f6a (diff)
downloadlatinime-8fbd55229243cb66c03d5ea1f79dfb39f596590d.tar.gz
latinime-8fbd55229243cb66c03d5ea1f79dfb39f596590d.tar.xz
latinime-8fbd55229243cb66c03d5ea1f79dfb39f596590d.zip
Add proximity info to native
Bug: 3311719 Change-Id: Ie596304070e321ad23fb67a13bf05e2b6af1b54b
Diffstat (limited to 'native/src/dictionary.h')
-rw-r--r--native/src/dictionary.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/native/src/dictionary.h b/native/src/dictionary.h
index 941bd191a..fbbb8312b 100644
--- a/native/src/dictionary.h
+++ b/native/src/dictionary.h
@@ -19,6 +19,7 @@
#include "bigram_dictionary.h"
#include "defines.h"
+#include "proximity_info.h"
#include "unigram_dictionary.h"
namespace latinime {
@@ -27,8 +28,10 @@ class Dictionary {
public:
Dictionary(void *dict, int dictSize, int mmapFd, int dictBufAdjust, int typedLetterMultipler,
int fullWordMultiplier, int maxWordLength, int maxWords, int maxAlternatives);
- int getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies) {
- return mUnigramDictionary->getSuggestions(codes, codesSize, outWords, frequencies);
+ int getSuggestions(ProximityInfo *proximityInfo, int *xcoordinates, int *ycoordinates,
+ int *codes, int codesSize, unsigned short *outWords, int *frequencies) {
+ return mUnigramDictionary->getSuggestions(proximityInfo, xcoordinates, ycoordinates, codes,
+ codesSize, outWords, frequencies);
}
// TODO: Call mBigramDictionary instead of mUnigramDictionary
@@ -38,6 +41,7 @@ public:
return mBigramDictionary->getBigrams(word, length, codes, codesSize, outWords, frequencies,
maxWordLength, maxBigrams, maxAlternatives);
}
+
bool isValidWord(unsigned short *word, int length);
int isValidWordRec(int pos, unsigned short *word, int offset, int length);
void *getDict() { return (void *)mDict; }