36 #define MAX_PERM_LENGTH 128
41 extern INT_VAR_H(fragments_debug, 0,
"Debug character fragments");
42 extern INT_VAR_H(segment_debug, 0,
"Debug the whole segmentation process");
43 extern BOOL_VAR_H(permute_debug, 0,
"char permutation debug");
46 "Turn on word script consistency permuter");
48 extern BOOL_VAR_H(permute_fixed_length_dawg, 0,
49 "Turn on fixed-length phrasebook search permuter");
52 "incorporate segmentation cost in word rating?");
55 "Score multipler for script consistency within a word. "
56 "Being a 'reward' factor, it should be <= 1. "
57 "Smaller value implies bigger reward.");
60 "Turn on character type (property) consistency permuter");
62 "Score multipler for char type consistency within a word. ");
64 extern double_VAR_H(segment_reward_ngram_best_choice, 0.99,
65 "Score multipler for ngram permuter's best choice"
66 " (only used in the Han script path).");
68 extern INT_VAR_H(max_permuter_attempts, 100000,
69 "Maximum number of different character choices to consider"
70 " during permutation. This limit is especially useful when"
71 " user patterns are specified, since overly generic patterns"
72 " can result in dawg search exploring an overly large number"
81 float rating,
float *new_rating,
float *adjust_factor);
84 const char *second_char,
85 const char *third_char,
86 const char *prev_char,
87 const char *next_char,
88 const char *next_next_char);
122 void AddPreference(
int start_pos,
char* pos_str,
float weight);
134 static const char kPosFree =
'.';
143 bool allow_collision_;
144 float adjust_factor_;