PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
stem_ISO_8859_1_indonesian.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_envindonesian_ISO_8859_1_create_env (void)
 
void indonesian_ISO_8859_1_close_env (struct SN_env *z)
 
int indonesian_ISO_8859_1_stem (struct SN_env *z)
 

Function Documentation

◆ indonesian_ISO_8859_1_close_env()

void indonesian_ISO_8859_1_close_env ( struct SN_env z)

Definition at line 406 of file stem_ISO_8859_1_indonesian.c.

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

References SN_close_env().

◆ indonesian_ISO_8859_1_create_env()

struct SN_env * indonesian_ISO_8859_1_create_env ( void  )

Definition at line 404 of file stem_ISO_8859_1_indonesian.c.

404{ 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().

◆ indonesian_ISO_8859_1_stem()

int indonesian_ISO_8859_1_stem ( struct SN_env z)

Definition at line 313 of file stem_ISO_8859_1_indonesian.c.

313 {
314 z->I[1] = 0;
315 { int c1 = z->c;
316 while(1) {
317 int c2 = z->c;
318 {
319 int ret = out_grouping(z, g_vowel, 97, 117, 1);
320 if (ret < 0) goto lab1;
321 z->c += ret;
322 }
323 z->I[1] += 1;
324 continue;
325 lab1:
326 z->c = c2;
327 break;
328 }
329 z->c = c1;
330 }
331 if (!(z->I[1] > 2)) return 0;
332 z->I[0] = 0;
333 z->lb = z->c; z->c = z->l;
334
335 { int m3 = z->l - z->c; (void)m3;
336 { int ret = r_remove_particle(z);
337 if (ret < 0) return ret;
338 }
339 z->c = z->l - m3;
340 }
341 if (!(z->I[1] > 2)) return 0;
342 { int m4 = z->l - z->c; (void)m4;
343 { int ret = r_remove_possessive_pronoun(z);
344 if (ret < 0) return ret;
345 }
346 z->c = z->l - m4;
347 }
348 z->c = z->lb;
349 if (!(z->I[1] > 2)) return 0;
350 { int c5 = z->c;
351 { int c_test6 = z->c;
352 { int ret = r_remove_first_order_prefix(z);
353 if (ret == 0) goto lab3;
354 if (ret < 0) return ret;
355 }
356 { int c7 = z->c;
357 { int c_test8 = z->c;
358 if (!(z->I[1] > 2)) goto lab4;
359 z->lb = z->c; z->c = z->l;
360
361 { int ret = r_remove_suffix(z);
362 if (ret == 0) goto lab4;
363 if (ret < 0) return ret;
364 }
365 z->c = z->lb;
366 z->c = c_test8;
367 }
368 if (!(z->I[1] > 2)) goto lab4;
369 { int ret = r_remove_second_order_prefix(z);
370 if (ret == 0) goto lab4;
371 if (ret < 0) return ret;
372 }
373 lab4:
374 z->c = c7;
375 }
376 z->c = c_test6;
377 }
378 goto lab2;
379 lab3:
380 z->c = c5;
381 { int c9 = z->c;
382 { int ret = r_remove_second_order_prefix(z);
383 if (ret < 0) return ret;
384 }
385 z->c = c9;
386 }
387 { int c10 = z->c;
388 if (!(z->I[1] > 2)) goto lab5;
389 z->lb = z->c; z->c = z->l;
390
391 { int ret = r_remove_suffix(z);
392 if (ret == 0) goto lab5;
393 if (ret < 0) return ret;
394 }
395 z->c = z->lb;
396 lab5:
397 z->c = c10;
398 }
399 }
400lab2:
401 return 1;
402}
static int r_remove_particle(struct SN_env *z)
static int r_remove_first_order_prefix(struct SN_env *z)
static int r_remove_suffix(struct SN_env *z)
static int r_remove_possessive_pronoun(struct SN_env *z)
static int r_remove_second_order_prefix(struct SN_env *z)
static const unsigned char g_vowel[]
int lb
Definition: api.h:16
int * I
Definition: api.h:18
int c
Definition: api.h:16
int l
Definition: api.h:16
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:191

References SN_env::c, g_vowel, SN_env::I, SN_env::l, SN_env::lb, out_grouping(), r_remove_first_order_prefix(), r_remove_particle(), r_remove_possessive_pronoun(), r_remove_second_order_prefix(), and r_remove_suffix().