Create "src/utils" directory
Change-Id: I0b7c51d181edc4786e343f7a953367b040ee6b66main
parent
f497e1e5a0
commit
addea83bad
|
@ -57,7 +57,6 @@ LATIN_IME_CORE_SRC_FILES := \
|
||||||
dic_node_utils.cpp \
|
dic_node_utils.cpp \
|
||||||
dic_nodes_cache.cpp) \
|
dic_nodes_cache.cpp) \
|
||||||
$(addprefix suggest/core/dictionary/, \
|
$(addprefix suggest/core/dictionary/, \
|
||||||
char_utils.cpp \
|
|
||||||
binary_dictionary_format.cpp \
|
binary_dictionary_format.cpp \
|
||||||
byte_array_utils.cpp \
|
byte_array_utils.cpp \
|
||||||
dictionary.cpp \
|
dictionary.cpp \
|
||||||
|
@ -76,7 +75,8 @@ LATIN_IME_CORE_SRC_FILES := \
|
||||||
typing_scoring.cpp \
|
typing_scoring.cpp \
|
||||||
typing_suggest_policy.cpp \
|
typing_suggest_policy.cpp \
|
||||||
typing_traversal.cpp \
|
typing_traversal.cpp \
|
||||||
typing_weighting.cpp)
|
typing_weighting.cpp) \
|
||||||
|
utils/char_utils.cpp
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
$(LATIN_IME_JNI_SRC_FILES) \
|
$(LATIN_IME_JNI_SRC_FILES) \
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
||||||
#include "suggest/core/dictionary/binary_format.h"
|
#include "suggest/core/dictionary/binary_format.h"
|
||||||
#include "suggest/core/dictionary/bloom_filter.h"
|
#include "suggest/core/dictionary/bloom_filter.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/dictionary/dictionary.h"
|
#include "suggest/core/dictionary/dictionary.h"
|
||||||
#include "suggest/core/dictionary/probability_utils.h"
|
#include "suggest/core/dictionary/probability_utils.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
#include "correction.h"
|
#include "correction.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/proximity_info_state.h"
|
#include "suggest/core/layout/proximity_info_state.h"
|
||||||
#include "suggest/core/layout/touch_position_correction_utils.h"
|
#include "suggest/core/layout/touch_position_correction_utils.h"
|
||||||
#include "suggest/policyimpl/utils/edit_distance.h"
|
#include "suggest/policyimpl/utils/edit_distance.h"
|
||||||
#include "suggest/policyimpl/utils/damerau_levenshtein_edit_distance_policy.h"
|
#include "suggest/policyimpl/utils/damerau_levenshtein_edit_distance_policy.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
#include "correction_state.h"
|
#include "correction_state.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/proximity_info_state.h"
|
#include "suggest/core/layout/proximity_info_state.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
#include "suggest/core/dicnode/dic_node_profiler.h"
|
#include "suggest/core/dicnode/dic_node_profiler.h"
|
||||||
#include "suggest/core/dicnode/dic_node_properties.h"
|
#include "suggest/core/dicnode/dic_node_properties.h"
|
||||||
#include "suggest/core/dicnode/dic_node_release_listener.h"
|
#include "suggest/core/dicnode/dic_node_release_listener.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/dictionary/digraph_utils.h"
|
#include "suggest/core/dictionary/digraph_utils.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
#if DEBUG_DICT
|
#if DEBUG_DICT
|
||||||
#define LOGI_SHOW_ADD_COST_PROP \
|
#define LOGI_SHOW_ADD_COST_PROP \
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
#include "suggest/core/dicnode/dic_node_vector.h"
|
#include "suggest/core/dicnode/dic_node_vector.h"
|
||||||
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
||||||
#include "suggest/core/dictionary/binary_format.h"
|
#include "suggest/core/dictionary/binary_format.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/dictionary/multi_bigram_map.h"
|
#include "suggest/core/dictionary/multi_bigram_map.h"
|
||||||
#include "suggest/core/dictionary/probability_utils.h"
|
#include "suggest/core/dictionary/probability_utils.h"
|
||||||
#include "suggest/core/layout/proximity_info.h"
|
#include "suggest/core/layout/proximity_info.h"
|
||||||
#include "suggest/core/layout/proximity_info_state.h"
|
#include "suggest/core/layout/proximity_info_state.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "hash_map_compat.h"
|
|
||||||
#include "suggest/core/dictionary/bloom_filter.h"
|
#include "suggest/core/dictionary/bloom_filter.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/dictionary/probability_utils.h"
|
#include "suggest/core/dictionary/probability_utils.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
#include "utils/hash_map_compat.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dictionary/binary_format.h"
|
#include "suggest/core/dictionary/binary_format.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#define LATINIME_MULTI_BIGRAM_MAP_H
|
#define LATINIME_MULTI_BIGRAM_MAP_H
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "hash_map_compat.h"
|
|
||||||
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
||||||
#include "suggest/core/dictionary/binary_format.h"
|
#include "suggest/core/dictionary/binary_format.h"
|
||||||
|
#include "utils/hash_map_compat.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/additional_proximity_chars.h"
|
#include "suggest/core/layout/additional_proximity_chars.h"
|
||||||
#include "suggest/core/layout/geometry_utils.h"
|
#include "suggest/core/layout/geometry_utils.h"
|
||||||
#include "suggest/core/layout/proximity_info_params.h"
|
#include "suggest/core/layout/proximity_info_params.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
#define LATINIME_PROXIMITY_INFO_H
|
#define LATINIME_PROXIMITY_INFO_H
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "hash_map_compat.h"
|
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
#include "suggest/core/layout/proximity_info_utils.h"
|
#include "suggest/core/layout/proximity_info_utils.h"
|
||||||
|
#include "utils/hash_map_compat.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/geometry_utils.h"
|
#include "suggest/core/layout/geometry_utils.h"
|
||||||
#include "suggest/core/layout/proximity_info.h"
|
#include "suggest/core/layout/proximity_info.h"
|
||||||
#include "suggest/core/layout/proximity_info_state_utils.h"
|
#include "suggest/core/layout/proximity_info_state_utils.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "hash_map_compat.h"
|
|
||||||
#include "suggest/core/layout/proximity_info_params.h"
|
#include "suggest/core/layout/proximity_info_params.h"
|
||||||
#include "suggest/core/layout/proximity_info_state_utils.h"
|
#include "suggest/core/layout/proximity_info_state_utils.h"
|
||||||
|
#include "utils/hash_map_compat.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "hash_map_compat.h"
|
#include "utils/hash_map_compat.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
class ProximityInfo;
|
class ProximityInfo;
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "hash_map_compat.h"
|
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/additional_proximity_chars.h"
|
#include "suggest/core/layout/additional_proximity_chars.h"
|
||||||
#include "suggest/core/layout/geometry_utils.h"
|
#include "suggest/core/layout/geometry_utils.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
#include "utils/hash_map_compat.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
class ProximityInfoUtils {
|
class ProximityInfoUtils {
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dicnode/dic_node.h"
|
#include "suggest/core/dicnode/dic_node.h"
|
||||||
#include "suggest/core/dicnode/dic_node_vector.h"
|
#include "suggest/core/dicnode/dic_node_vector.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/proximity_info_state.h"
|
#include "suggest/core/layout/proximity_info_state.h"
|
||||||
#include "suggest/core/policy/traversal.h"
|
#include "suggest/core/policy/traversal.h"
|
||||||
#include "suggest/core/session/dic_traverse_session.h"
|
#include "suggest/core/session/dic_traverse_session.h"
|
||||||
#include "suggest/policyimpl/typing/scoring_params.h"
|
#include "suggest/policyimpl/typing/scoring_params.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
class TypingTraversal : public Traversal {
|
class TypingTraversal : public Traversal {
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
|
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dicnode/dic_node_utils.h"
|
#include "suggest/core/dicnode/dic_node_utils.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/layout/touch_position_correction_utils.h"
|
#include "suggest/core/layout/touch_position_correction_utils.h"
|
||||||
#include "suggest/core/policy/weighting.h"
|
#include "suggest/core/policy/weighting.h"
|
||||||
#include "suggest/core/session/dic_traverse_session.h"
|
#include "suggest/core/session/dic_traverse_session.h"
|
||||||
#include "suggest/policyimpl/typing/scoring_params.h"
|
#include "suggest/policyimpl/typing/scoring_params.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
#ifndef LATINIME_DAEMARU_LEVENSHTEIN_EDIT_DISTANCE_POLICY_H
|
#ifndef LATINIME_DAEMARU_LEVENSHTEIN_EDIT_DISTANCE_POLICY_H
|
||||||
#define LATINIME_DAEMARU_LEVENSHTEIN_EDIT_DISTANCE_POLICY_H
|
#define LATINIME_DAEMARU_LEVENSHTEIN_EDIT_DISTANCE_POLICY_H
|
||||||
|
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/policyimpl/utils/edit_distance_policy.h"
|
#include "suggest/policyimpl/utils/edit_distance_policy.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,12 @@
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
#include "suggest/core/dictionary/binary_dictionary_info.h"
|
||||||
#include "suggest/core/dictionary/binary_format.h"
|
#include "suggest/core/dictionary/binary_format.h"
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
|
||||||
#include "suggest/core/dictionary/dictionary.h"
|
#include "suggest/core/dictionary/dictionary.h"
|
||||||
#include "suggest/core/dictionary/digraph_utils.h"
|
#include "suggest/core/dictionary/digraph_utils.h"
|
||||||
#include "suggest/core/dictionary/probability_utils.h"
|
#include "suggest/core/dictionary/probability_utils.h"
|
||||||
#include "suggest/core/dictionary/terminal_attributes.h"
|
#include "suggest/core/dictionary/terminal_attributes.h"
|
||||||
#include "suggest/core/layout/proximity_info.h"
|
#include "suggest/core/layout/proximity_info.h"
|
||||||
|
#include "utils/char_utils.h"
|
||||||
#include "unigram_dictionary.h"
|
#include "unigram_dictionary.h"
|
||||||
#include "words_priority_queue.h"
|
#include "words_priority_queue.h"
|
||||||
#include "words_priority_queue_pool.h"
|
#include "words_priority_queue_pool.h"
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "suggest/core/dictionary/char_utils.h"
|
#include "utils/char_utils.h"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ struct LatinCapitalSmallPair {
|
||||||
* $ apt-get install libicu-dev
|
* $ apt-get install libicu-dev
|
||||||
*
|
*
|
||||||
* 3. Build the following code
|
* 3. Build the following code
|
||||||
* $ g++ -o char_utils -I../../.. -DUPDATING_CHAR_UTILS char_utils.cpp -licuuc
|
* $ g++ -o char_utils -I.. -DUPDATING_CHAR_UTILS char_utils.cpp -licuuc
|
||||||
*/
|
*/
|
||||||
#ifdef UPDATING_CHAR_UTILS
|
#ifdef UPDATING_CHAR_UTILS
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -70,8 +70,7 @@ extern "C" int main() {
|
||||||
*
|
*
|
||||||
* 5. Update the SORTED_CHAR_MAP[] array below with the output above.
|
* 5. Update the SORTED_CHAR_MAP[] array below with the output above.
|
||||||
* Then, rebuild with -DCONFIRMING_CHAR_UTILS and confirm the program exits successfully.
|
* Then, rebuild with -DCONFIRMING_CHAR_UTILS and confirm the program exits successfully.
|
||||||
* $ g++ -o char_utils -I../../.. -DUPDATING_CHAR_UTILS -DCONFIRMING_CHAR_UTILS char_utils.cpp \
|
* $ g++ -o char_utils -I.. -DUPDATING_CHAR_UTILS -DCONFIRMING_CHAR_UTILS char_utils.cpp -licuuc
|
||||||
* -licuuc
|
|
||||||
* $ ./char_utils
|
* $ ./char_utils
|
||||||
* $
|
* $
|
||||||
*/
|
*/
|
Loading…
Reference in New Issue