OLD | NEW |
1 #ifndef _SUGGESTMGR_HXX_ | 1 #ifndef _SUGGESTMGR_HXX_ |
2 #define _SUGGESTMGR_HXX_ | 2 #define _SUGGESTMGR_HXX_ |
3 | 3 |
4 #define MAXSWL 100 | 4 #define MAXSWL 100 |
5 #define MAXSWUTF8L (MAXSWL * 4) | 5 #define MAXSWUTF8L (MAXSWL * 4) |
6 #define MAX_ROOTS 100 | 6 #define MAX_ROOTS 100 |
7 #define MAX_WORDS 100 | 7 #define MAX_WORDS 100 |
8 #define MAX_GUESS 200 | 8 #define MAX_GUESS 200 |
9 #define MAXNGRAMSUGS 4 | 9 #define MAXNGRAMSUGS 4 |
10 #define MAXPHONSUGS 2 | 10 #define MAXPHONSUGS 2 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 struct cs_info * csconv; | 45 struct cs_info * csconv; |
46 int utf8; | 46 int utf8; |
47 int langnum; | 47 int langnum; |
48 int nosplitsugs; | 48 int nosplitsugs; |
49 int maxngramsugs; | 49 int maxngramsugs; |
50 int maxcpdsugs; | 50 int maxcpdsugs; |
51 int complexprefixes; | 51 int complexprefixes; |
52 | 52 |
53 | 53 |
54 public: | 54 public: |
| 55 #ifdef HUNSPELL_CHROME_CLIENT |
| 56 SuggestMgr(hunspell::BDictReader* reader, const char * tryme, int maxn, AffixM
gr *aptr); |
| 57 #else |
55 SuggestMgr(const char * tryme, int maxn, AffixMgr *aptr); | 58 SuggestMgr(const char * tryme, int maxn, AffixMgr *aptr); |
| 59 #endif |
56 ~SuggestMgr(); | 60 ~SuggestMgr(); |
57 | 61 |
58 int suggest(char*** slst, const char * word, int nsug, int * onlycmpdsug); | 62 int suggest(char*** slst, const char * word, int nsug, int * onlycmpdsug); |
59 int ngsuggest(char ** wlst, char * word, int ns, HashMgr** pHMgr, int md); | 63 int ngsuggest(char ** wlst, char * word, int ns, HashMgr** pHMgr, int md); |
60 int suggest_auto(char*** slst, const char * word, int nsug); | 64 int suggest_auto(char*** slst, const char * word, int nsug); |
61 int suggest_stems(char*** slst, const char * word, int nsug); | 65 int suggest_stems(char*** slst, const char * word, int nsug); |
62 int suggest_pos_stems(char*** slst, const char * word, int nsug); | 66 int suggest_pos_stems(char*** slst, const char * word, int nsug); |
63 | 67 |
64 char * suggest_morph(const char * word); | 68 char * suggest_morph(const char * word); |
65 char * suggest_gen(char ** pl, int pln, char * pattern); | 69 char * suggest_gen(char ** pl, int pln, char * pattern); |
66 char * suggest_morph_for_spelling_error(const char * word); | 70 char * suggest_morph_for_spelling_error(const char * word); |
67 | 71 |
68 private: | 72 private: |
| 73 #ifdef HUNSPELL_CHROME_CLIENT |
| 74 // Not owned by us, owned by the Hunspell object. |
| 75 hunspell::BDictReader* bdict_reader; |
| 76 #endif |
69 int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsugge
st, | 77 int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsugge
st, |
70 int * timer, clock_t * timelimit); | 78 int * timer, clock_t * timelimit); |
71 int checkword(const char *, int, int, int *, clock_t *); | 79 int checkword(const char *, int, int, int *, clock_t *); |
72 int check_forbidden(const char *, int); | 80 int check_forbidden(const char *, int); |
73 | 81 |
74 int capchars(char **, const char *, int, int); | 82 int capchars(char **, const char *, int, int); |
75 int replchars(char**, const char *, int, int); | 83 int replchars(char**, const char *, int, int); |
76 int doubletwochars(char**, const char *, int, int); | 84 int doubletwochars(char**, const char *, int, int); |
77 int forgotchar(char **, const char *, int, int); | 85 int forgotchar(char **, const char *, int, int); |
78 int swapchar(char **, const char *, int, int); | 86 int swapchar(char **, const char *, int, int); |
(...skipping 23 matching lines...) Expand all Loading... |
102 int commoncharacterpositions(char * s1, const char * s2, int * is_swap); | 110 int commoncharacterpositions(char * s1, const char * s2, int * is_swap); |
103 void bubblesort( char ** rwd, char ** rwd2, int * rsc, int n); | 111 void bubblesort( char ** rwd, char ** rwd2, int * rsc, int n); |
104 void lcs(const char * s, const char * s2, int * l1, int * l2, char ** result)
; | 112 void lcs(const char * s, const char * s2, int * l1, int * l2, char ** result)
; |
105 int lcslen(const char * s, const char* s2); | 113 int lcslen(const char * s, const char* s2); |
106 char * suggest_hentry_gen(hentry * rv, char * pattern); | 114 char * suggest_hentry_gen(hentry * rv, char * pattern); |
107 | 115 |
108 }; | 116 }; |
109 | 117 |
110 #endif | 118 #endif |
111 | 119 |
OLD | NEW |