PostgreSQL Source Code git master
stem_UTF_8_hindi.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_envhindi_UTF_8_create_env (void)
 
void hindi_UTF_8_close_env (struct SN_env *z)
 
int hindi_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ hindi_UTF_8_close_env()

void hindi_UTF_8_close_env ( struct SN_env z)

Definition at line 315 of file stem_UTF_8_hindi.c.

315 {
316 SN_delete_env(z);
317}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ hindi_UTF_8_create_env()

struct SN_env * hindi_UTF_8_create_env ( void  )

Definition at line 311 of file stem_UTF_8_hindi.c.

311 {
312 return SN_new_env(sizeof(struct SN_env));
313}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ hindi_UTF_8_stem()

int hindi_UTF_8_stem ( struct SN_env z)

Definition at line 293 of file stem_UTF_8_hindi.c.

293 {
294 {
295 int ret = skip_utf8(z->p, z->c, z->l, 1);
296 if (ret < 0) return 0;
297 z->c = ret;
298 }
299 z->lb = z->c; z->c = z->l;
300 z->ket = z->c;
301 if (!find_among_b(z, a_0, 132, r_CONSONANT)) return 0;
302 z->bra = z->c;
303 {
304 int ret = slice_del(z);
305 if (ret < 0) return ret;
306 }
307 z->c = z->lb;
308 return 1;
309}
static int r_CONSONANT(struct SN_env *z)
static const struct among a_0[132]
int lb
Definition: api.h:17
symbol * p
Definition: api.h:16
int ket
Definition: api.h:17
int c
Definition: api.h:17
int bra
Definition: api.h:17
int l
Definition: api.h:17
int find_among_b(struct SN_env *z, const struct among *v, int v_size, int(*call_among_func)(struct SN_env *))
Definition: utilities.c:315
SNOWBALL_ERR slice_del(struct SN_env *z)
Definition: utilities.c:443
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:43

References a_0, SN_env::bra, SN_env::c, find_among_b(), SN_env::ket, SN_env::l, SN_env::lb, SN_env::p, r_CONSONANT(), skip_utf8(), and slice_del().