5 #ifdef __SUNPRO_CC // for SunONE Studio compiler
14 #include "baseaffix.hxx"
15 #include "hashmgr.hxx"
17 // check flag duplication
18 #define dupSFX (1 << 0)
19 #define dupPFX (1 << 1)
24 AffEntry
* pStart
[SETSIZE
];
25 AffEntry
* sStart
[SETSIZE
];
26 AffEntry
* pFlag
[CONTSIZE
];
27 AffEntry
* sFlag
[CONTSIZE
];
31 struct cs_info
* csconv
;
39 FLAG compoundforbidflag
;
40 FLAG compoundpermitflag
;
43 int checkcompoundcase
;
44 int checkcompoundtriple
;
56 replentry
* checkcpdtable
;
58 flagentry
* defcpdtable
;
65 w_char
* cpdvowels_utf16
;
66 int cpdvowels_utf16_len
;
67 char * cpdsyllablenum
;
68 const char * pfxappnd
; // BUG: not stateless
69 const char * sfxappnd
; // BUG: not stateless
70 FLAG sfxflag
; // BUG: not stateless
71 char * derived
; // BUG: not stateless
72 AffEntry
* sfx
; // BUG: not stateless
73 AffEntry
* pfx
; // BUG: not stateless
76 unsigned short * wordchars_utf16
;
77 int wordchars_utf16_len
;
79 unsigned short * ignorechars_utf16
;
80 int ignorechars_utf16_len
;
90 int havecontclass
; // boolean variable
91 char contclasses
[CONTSIZE
]; // flags of possible continuing classes (twofold affix)
96 AffixMgr(const char * affpath
, HashMgr
* ptr
);
98 struct hentry
* affix_check(const char * word
, int len
,
99 const unsigned short needflag
= (unsigned short) 0, char in_compound
= IN_CPD_NOT
);
100 struct hentry
* prefix_check(const char * word
, int len
,
101 char in_compound
, const FLAG needflag
= FLAG_NULL
);
102 inline int isSubset(const char * s1
, const char * s2
);
103 struct hentry
* prefix_check_twosfx(const char * word
, int len
,
104 char in_compound
, const FLAG needflag
= FLAG_NULL
);
105 inline int isRevSubset(const char * s1
, const char * end_of_s2
, int len
);
106 struct hentry
* suffix_check(const char * word
, int len
, int sfxopts
, AffEntry
* ppfx
,
107 char ** wlst
, int maxSug
, int * ns
, const FLAG cclass
= FLAG_NULL
,
108 const FLAG needflag
= FLAG_NULL
, char in_compound
= IN_CPD_NOT
);
109 struct hentry
* suffix_check_twosfx(const char * word
, int len
,
110 int sfxopts
, AffEntry
* ppfx
, const FLAG needflag
= FLAG_NULL
);
112 char * affix_check_morph(const char * word
, int len
,
113 const FLAG needflag
= FLAG_NULL
, char in_compound
= IN_CPD_NOT
);
114 char * prefix_check_morph(const char * word
, int len
,
115 char in_compound
, const FLAG needflag
= FLAG_NULL
);
116 char * suffix_check_morph (const char * word
, int len
, int sfxopts
, AffEntry
* ppfx
,
117 const FLAG cclass
= FLAG_NULL
, const FLAG needflag
= FLAG_NULL
, char in_compound
= IN_CPD_NOT
);
119 char * prefix_check_twosfx_morph(const char * word
, int len
,
120 char in_compound
, const FLAG needflag
= FLAG_NULL
);
121 char * suffix_check_twosfx_morph(const char * word
, int len
,
122 int sfxopts
, AffEntry
* ppfx
, const FLAG needflag
= FLAG_NULL
);
124 int expand_rootword(struct guessword
* wlst
, int maxn
, const char * ts
,
125 int wl
, const unsigned short * ap
, unsigned short al
, char * bad
, int);
127 short get_syllable (const char * word
, int wlen
);
128 int cpdrep_check(const char * word
, int len
);
129 int cpdpat_check(const char * word
, int len
);
130 int defcpd_check(hentry
*** words
, short wnum
, hentry
* rv
, hentry
** rwords
, char all
);
131 int cpdcase_check(const char * word
, int len
);
132 inline int candidate_check(const char * word
, int len
);
133 struct hentry
* compound_check(const char * word
, int len
,
134 short wordnum
, short numsyllable
, short maxwordnum
, short wnum
, hentry
** words
,
135 char hu_mov_rule
, int * cmpdstemnum
, int * cmpdstem
, char is_sug
);
137 int compound_check_morph(const char * word
, int len
,
138 short wordnum
, short numsyllable
, short maxwordnum
, short wnum
, hentry
** words
,
139 char hu_mov_rule
, char ** result
, char * partresult
);
141 struct hentry
* lookup(const char * word
);
143 struct replentry
* get_reptable();
145 struct mapentry
* get_maptable();
147 char ** get_breaktable();
148 char * get_encoding();
150 char * get_try_string();
151 const char * get_wordchars();
152 unsigned short * get_wordchars_utf16(int * len
);
154 unsigned short * get_ignore_utf16(int * len
);
156 FLAG
get_compoundflag();
157 FLAG
get_compoundbegin();
158 FLAG
get_forbiddenword();
159 FLAG
get_nosuggest();
160 // FLAG get_circumfix();
161 FLAG
get_pseudoroot();
162 FLAG
get_onlyincompound();
163 FLAG
get_compoundroot();
164 FLAG
get_lemma_present();
166 char * get_possible_root();
167 const char * get_prefix();
168 const char * get_suffix();
169 const char * get_derived();
170 const char * get_version();
171 const int have_contclass();
173 int get_complexprefixes();
174 char * get_suffixed(char );
175 int get_maxngramsugs();
176 int get_nosplitsugs();
177 int get_sugswithdots(void);
178 FLAG
get_keepcase(void);
179 int get_checksharps(void);
182 int parse_file(const char * affpath
);
183 // int parse_string(char * line, char ** out, const char * name);
184 int parse_flag(char * line
, unsigned short * out
, const char * name
);
185 int parse_num(char * line
, int * out
, const char * name
);
186 // int parse_array(char * line, char ** out, unsigned short ** out_utf16,
187 // int * out_utf16_len, const char * name);
188 int parse_cpdsyllable(char * line
);
189 int parse_reptable(char * line
, FILE * af
);
190 int parse_maptable(char * line
, FILE * af
);
191 int parse_breaktable(char * line
, FILE * af
);
192 int parse_checkcpdtable(char * line
, FILE * af
);
193 int parse_defcpdtable(char * line
, FILE * af
);
194 int parse_affix(char * line
, const char at
, FILE * af
, char * dupflags
);
196 int encodeit(struct affentry
* ptr
, char * cs
);
197 int build_pfxtree(AffEntry
* pfxptr
);
198 int build_sfxtree(AffEntry
* sfxptr
);
199 int process_pfx_order();
200 int process_sfx_order();
201 AffEntry
* process_pfx_in_order(AffEntry
* ptr
, AffEntry
* nptr
);
202 AffEntry
* process_sfx_in_order(AffEntry
* ptr
, AffEntry
* nptr
);
203 int process_pfx_tree_to_list();
204 int process_sfx_tree_to_list();
205 int redundant_condition(char, char * strip
, int stripl
, const char * cond
, char *);