PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
stem_UTF_8_norwegian.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct SN_envnorwegian_UTF_8_create_env (void)
 
void norwegian_UTF_8_close_env (struct SN_env *z)
 
int norwegian_UTF_8_stem (struct SN_env *z)
 

Function Documentation

void norwegian_UTF_8_close_env ( struct SN_env z)

Definition at line 298 of file stem_UTF_8_norwegian.c.

References SN_close_env().

298 { SN_close_env(z, 0); }
void SN_close_env(struct SN_env *z, int S_size)
Definition: api.c:40
struct SN_env* norwegian_UTF_8_create_env ( void  )

Definition at line 296 of file stem_UTF_8_norwegian.c.

References SN_create_env().

296 { return SN_create_env(0, 2, 0); }
struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
Definition: api.c:3
int norwegian_UTF_8_stem ( struct SN_env z)

Definition at line 257 of file stem_UTF_8_norwegian.c.

References SN_env::c, SN_env::l, SN_env::lb, r_consonant_pair(), r_main_suffix(), r_mark_regions(), and r_other_suffix().

257  {
258  { int c1 = z->c; /* do, line 74 */
259  { int ret = r_mark_regions(z);
260  if (ret == 0) goto lab0; /* call mark_regions, line 74 */
261  if (ret < 0) return ret;
262  }
263  lab0:
264  z->c = c1;
265  }
266  z->lb = z->c; z->c = z->l; /* backwards, line 75 */
267 
268  { int m2 = z->l - z->c; (void)m2; /* do, line 76 */
269  { int ret = r_main_suffix(z);
270  if (ret == 0) goto lab1; /* call main_suffix, line 76 */
271  if (ret < 0) return ret;
272  }
273  lab1:
274  z->c = z->l - m2;
275  }
276  { int m3 = z->l - z->c; (void)m3; /* do, line 77 */
277  { int ret = r_consonant_pair(z);
278  if (ret == 0) goto lab2; /* call consonant_pair, line 77 */
279  if (ret < 0) return ret;
280  }
281  lab2:
282  z->c = z->l - m3;
283  }
284  { int m4 = z->l - z->c; (void)m4; /* do, line 78 */
285  { int ret = r_other_suffix(z);
286  if (ret == 0) goto lab3; /* call other_suffix, line 78 */
287  if (ret < 0) return ret;
288  }
289  lab3:
290  z->c = z->l - m4;
291  }
292  z->c = z->lb;
293  return 1;
294 }
static int r_other_suffix(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
static int r_consonant_pair(struct SN_env *z)
int c
Definition: api.h:16
int lb
Definition: api.h:16
static int r_main_suffix(struct SN_env *z)
int l
Definition: api.h:16