PostgreSQL Source Code  git master
stem_UTF_8_swedish.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_envswedish_UTF_8_create_env (void)
 
void swedish_UTF_8_close_env (struct SN_env *z)
 
int swedish_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ swedish_UTF_8_close_env()

void swedish_UTF_8_close_env ( struct SN_env z)

Definition at line 291 of file stem_UTF_8_swedish.c.

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

References SN_close_env().

◆ swedish_UTF_8_create_env()

struct SN_env* swedish_UTF_8_create_env ( void  )

Definition at line 289 of file stem_UTF_8_swedish.c.

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

References SN_create_env().

◆ swedish_UTF_8_stem()

int swedish_UTF_8_stem ( struct SN_env z)

Definition at line 258 of file stem_UTF_8_swedish.c.

258  {
259  { int c1 = z->c;
260  { int ret = r_mark_regions(z);
261  if (ret < 0) return ret;
262  }
263  z->c = c1;
264  }
265  z->lb = z->c; z->c = z->l;
266 
267  { int m2 = z->l - z->c; (void)m2;
268  { int ret = r_main_suffix(z);
269  if (ret < 0) return ret;
270  }
271  z->c = z->l - m2;
272  }
273  { int m3 = z->l - z->c; (void)m3;
274  { int ret = r_consonant_pair(z);
275  if (ret < 0) return ret;
276  }
277  z->c = z->l - m3;
278  }
279  { int m4 = z->l - z->c; (void)m4;
280  { int ret = r_other_suffix(z);
281  if (ret < 0) return ret;
282  }
283  z->c = z->l - m4;
284  }
285  z->c = z->lb;
286  return 1;
287 }
static int r_other_suffix(struct SN_env *z)
static int r_consonant_pair(struct SN_env *z)
static int r_main_suffix(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
int lb
Definition: api.h:16
int c
Definition: api.h:16
int l
Definition: api.h:16

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