aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/unigram_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/unigram_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/unigram_dictionary.h')
-rw-r--r--native/src/unigram_dictionary.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/native/src/unigram_dictionary.h b/native/src/unigram_dictionary.h
index db40646e1..e84875b59 100644
--- a/native/src/unigram_dictionary.h
+++ b/native/src/unigram_dictionary.h
@@ -18,6 +18,7 @@
#define LATINIME_UNIGRAM_DICTIONARY_H
#include "defines.h"
+#include "proximity_info.h"
namespace latinime {
@@ -32,7 +33,8 @@ class UnigramDictionary {
public:
UnigramDictionary(const unsigned char *dict, int typedLetterMultipler, int fullWordMultiplier,
int maxWordLength, int maxWords, int maxProximityChars, const bool isLatestDictVersion);
- int getSuggestions(int *codes, int codesSize, unsigned short *outWords, int *frequencies);
+ int getSuggestions(ProximityInfo *proximityInfo, int *xcoordinates, int *ycoordinates,
+ int *codes, int codesSize, unsigned short *outWords, int *frequencies);
~UnigramDictionary();
private:
@@ -84,7 +86,9 @@ private:
const int startInputIndex, const int depth, unsigned short *word,
int *newChildPosition, int *newCount, bool *newTerminal, int *newFreq, int *siblingPos);
bool existsAdjacentProximityChars(const int inputIndex, const int inputLength);
- int* getInputCharsAt(const int index) {return mInputCodes + (index * MAX_PROXIMITY_CHARS);}
+ inline int* getInputCharsAt(const int index) {
+ return mInputCodes + (index * MAX_PROXIMITY_CHARS);
+ }
const unsigned char *DICT;
const int MAX_WORD_LENGTH;
const int MAX_WORDS;