00001
00019 #ifndef PERMNUM_H
00020 #define PERMNUM_H
00021
00022
00023
00024
00025 #include "choicearr.h"
00026
00027
00028
00029
00031 #define GOOD_NUMBER 1.1
00032
00033 #define OK_NUMBER 1.4
00034
00035 extern float ok_number;
00037 extern float good_number;
00038
00039
00040
00041
00042 void adjust_number(A_CHOICE *best_choice, float *certainty_array);
00043
00044 void append_number_choices(int state,
00045 char *word,
00046 CHOICES_LIST choices,
00047 int char_index,
00048 A_CHOICE *this_choice,
00049 float *limit,
00050 float rating,
00051 float certainty,
00052 float *certainty_array,
00053 CHOICES *result);
00054
00055 void init_permnum();
00056
00057 int number_character_type(char ch, int state);
00058
00059
00060 int number_state_change(int state, const char *word);
00061
00062 CHOICES number_permute(int state,
00063 CHOICES_LIST choices,
00064 int char_index,
00065 float *limit,
00066 char *word,
00067 float rating,
00068 float certainty,
00069 float *certainty_array);
00070
00071 A_CHOICE *number_permute_and_select(CHOICES_LIST char_choices,
00072 float rating_limit);
00073
00074 int pure_number(const char *string);
00075
00076 int valid_number(const char *string);
00077 #endif