00001
00020 #ifndef PERMUTE_H
00021 #define PERMUTE_H
00022
00023
00024
00025
00026 #include "choicearr.h"
00027
00028
00029
00030
00037 #define RATING_PAD 4.0
00038
00039
00040
00041
00043 extern int adjust_debug;
00045 extern float garbage;
00047 extern float non_word;
00053 extern int permute_only_top;
00054
00055
00056
00057
00058 void add_document_word(A_CHOICE *best_choice);
00059
00060 void adjust_non_word (A_CHOICE * best_choice, float certainties[]);
00061
00062 void init_permute();
00063 void end_permute();
00064
00065 A_CHOICE *permute_all(CHOICES_LIST char_choices,
00066 float rating_limit,
00067 A_CHOICE *raw_choice);
00068
00069 void permute_characters(CHOICES_LIST char_choices,
00070 float limit,
00071 A_CHOICE *best_choice,
00072 A_CHOICE *raw_choice);
00073
00074 A_CHOICE *permute_compound_words(CHOICES_LIST character_choices,
00075 float rating_limit);
00076
00077 void permute_subword(CHOICES_LIST character_choices,
00078 float rating_limit,
00079 int start,
00080 int end,
00081 char *word,
00082 float *rating,
00083 float *certainty);
00084
00085 A_CHOICE *permute_top_choice(CHOICES_LIST character_choices,
00086 float rating_limit,
00087 A_CHOICE *raw_choice,
00088 BOOL8 *any_alpha);
00089
00090 char choose_il1(char first_char,
00091 char second_char,
00092 char third_char,
00093 char prev_char,
00094 char next_char,
00095 char next_next_char);
00096
00097 A_CHOICE *permute_words(CHOICES_LIST char_choices, float rating_limit);
00098
00099 int valid_word(const char *string);
00100 #endif