(Step2)Move functions related to proximity to proximity_info.cpp

Change-Id: Iae0eb2a5cd758bda820fa42b4bc3eb3d2665bf96
diff --git a/native/src/dictionary.h b/native/src/dictionary.h
index 3dc577a..73e03d8 100644
--- a/native/src/dictionary.h
+++ b/native/src/dictionary.h
@@ -17,7 +17,9 @@
 #ifndef LATINIME_DICTIONARY_H
 #define LATINIME_DICTIONARY_H
 
+#include "basechars.h"
 #include "bigram_dictionary.h"
+#include "char_utils.h"
 #include "defines.h"
 #include "proximity_info.h"
 #include "unigram_dictionary.h"
@@ -61,7 +63,7 @@
     static int setDictionaryValues(const unsigned char *dict, const bool isLatestDictVersion,
             const int pos, unsigned short *c, int *childrenPosition,
             bool *terminal, int *freq);
-
+    static inline unsigned short toBaseLowerCase(unsigned short c);
     // TODO: delete this
     int getBigramPosition(unsigned short *word, int length);
 
@@ -156,6 +158,19 @@
     return position;
 }
 
+
+inline unsigned short Dictionary::toBaseLowerCase(unsigned short c) {
+    if (c < sizeof(BASE_CHARS) / sizeof(BASE_CHARS[0])) {
+        c = BASE_CHARS[c];
+    }
+    if (c >='A' && c <= 'Z') {
+        c |= 32;
+    } else if (c > 127) {
+        c = latin_tolower(c);
+    }
+    return c;
+}
+
 } // namespace latinime
 
 #endif // LATINIME_DICTIONARY_H