00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef STOPPER_H
00019 #define STOPPER_H
00020
00025 #include "states.h"
00026 #include "unichar.h"
00027 #include "varable.h"
00028
00029 typedef uinT8 BLOB_WIDTH;
00030
00031 typedef struct
00032 {
00033 inT16 index;
00034 unsigned bad_length:8;
00035 unsigned good_length:8;
00036 } DANGERR;
00037
00038 enum ACCEPTABLE_CHOICE_CALLER { CHOPPER_CALLER, ASSOCIATOR_CALLER };
00039 typedef struct
00040 {
00041 UNICHAR_ID Class;
00042 uinT16 NumChunks;
00043 float Certainty;
00044 }
00045
00046
00047 CHAR_CHOICE;
00048
00049 typedef struct
00050 {
00051 float Rating;
00052 float Certainty;
00053 FLOAT32 AdjustFactor;
00054 int Length;
00055 bool ComposedFromCharFragments;
00056 CHAR_CHOICE Blob[1];
00057 } VIABLE_CHOICE_STRUCT;
00058 typedef VIABLE_CHOICE_STRUCT *VIABLE_CHOICE;
00059
00060
00061
00062
00063 extern double_VAR_H(stopper_certainty_per_char, -0.50,
00064 "Certainty to add for each dict char above small word size.");
00065
00066 extern double_VAR_H(stopper_nondict_certainty_base, -2.50,
00067 "Certainty threshold for non-dict words");
00068
00069 extern double_VAR_H(stopper_phase2_certainty_rejection_offset, 1.0,
00070 "Reject certainty offset");
00071
00072 extern INT_VAR_H(stopper_debug_level, 0, "Stopper debug level");
00073
00074 extern BOOL_VAR_H(stopper_no_acceptable_choices, false,
00075 "Make AcceptableChoice() always return false. Useful"
00076 " when there is a need to explore all segmentations");
00077
00078 extern BOOL_VAR_H(save_raw_choices, false, "Save all explored raw choices");
00079
00080 #endif