00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef PERMUTE_H
00026 #define PERMUTE_H
00027
00028
00029
00030
00031
00032 #include "choicearr.h"
00033 #include "choices.h"
00034 #include "ratngs.h"
00035 #include "varable.h"
00036
00037
00038
00039
00040 #define RATING_PAD 4.0
00041
00042
00043
00044
00045 extern INT_VAR_H(fragments_debug, 0, "Debug character fragments");
00046 extern BOOL_VAR_H(segment_debug, 0, "Debug the whole segmentation process");
00047 extern BOOL_VAR_H(permute_debug, 0, "char permutation debug");
00048
00049 extern BOOL_VAR_H(permute_script_word, 0,
00050 "Turn on word script consistency permuter");
00051
00052 extern BOOL_VAR_H(segment_segcost_rating, 0,
00053 "incorporate segmentation cost in word rating?");
00054
00055 extern double_VAR_H(segment_reward_script, 0.95,
00056 "Score multipler for script consistency within a word. "
00057 "Being a 'reward' factor, it should be <= 1. "
00058 "Smaller value implies bigger reward.");
00059
00060 extern double_VAR_H(segment_penalty_garbage, 1.5,
00061 "Score multiplier for poorly cased strings that are not "
00062 "in the dictionary and generally look like garbage "
00063 "(lower is better).");
00064
00065 extern double_VAR_H(segment_penalty_dict_nonword, 1.25,
00066 "Score multiplier for glyph fragment segmentations which "
00067 "do not match a dictionary word (lower is better).");
00068
00069 extern int permute_only_top;
00070 extern float wordseg_rating_adjust_factor;
00071
00072
00073
00074
00075 void adjust_non_word(const char *word, const char *word_lengths,
00076 float rating, float *new_rating, float *adjust_factor);
00077
00078 const char* choose_il1(const char *first_char,
00079 const char *second_char,
00080 const char *third_char,
00081 const char *prev_char,
00082 const char *next_char,
00083 const char *next_next_char);
00084
00085 #endif