00001
00019 #ifndef PERMDAWG_H
00020 #define PERMDAWG_H
00021
00022
00023
00024
00025 #include "dawg.h"
00026 #include "choices.h"
00027 #include "choicearr.h"
00028
00029
00030
00031
00033 extern int dawg_debug;
00035 extern float ok_word;
00037 extern float good_word;
00039 extern float freq_word;
00040
00041
00042
00043
00044
00045
00046
00047
00048 void adjust_word(A_CHOICE *best_choice, float *certainty_array);
00049
00050
00051 void append_next_choice(EDGE_ARRAY dawg,
00052 NODE_REF node,
00053 char permuter,
00054 char *word,
00055 CHOICES_LIST choices,
00056 int char_index,
00057 A_CHOICE *this_choice,
00058 char prevchar,
00059 float *limit,
00060 float rating,
00061 float certainty,
00062 float *rating_array,
00063 float *certainty_array,
00064 int word_ending,
00065 int last_word,
00066 CHOICES *result);
00067
00068 CHOICES dawg_permute(EDGE_ARRAY dawg,
00069 NODE_REF node,
00070 char permuter,
00071 CHOICES_LIST choices,
00072 int char_index,
00073 float *limit,
00074 char *word,
00075 float rating,
00076 float certainty,
00077 float *rating_array,
00078 float *certainty_array,
00079 int last_word);
00080
00081 void dawg_permute_and_select(const char *string,
00082 EDGE_ARRAY dawg,
00083 char permuter,
00084 CHOICES_LIST character_choices,
00085 A_CHOICE *best_choice,
00086 INT16 system_words);
00087
00088 void init_permdawg();
00089 void end_permdawg();
00090
00091 int test_freq_words(const char *word);
00092 #endif