xapian-core  2.0.0
Classes | Macros | Functions
snowball_runtime.h File Reference
#include "api.h"
+ Include dependency graph for snowball_runtime.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  among
 

Macros

#define HEAD   2*sizeof(int)
 
#define SIZE(p)   ((const int *)(p))[-1]
 
#define SET_SIZE(p, n)   ((int *)(p))[-1] = n
 
#define CAPACITY(p)   ((int *)(p))[-2]
 
#define SNOWBALL_ERR   int
 

Functions

symbolcreate_s (void)
 
void lose_s (symbol *p)
 
int skip_utf8 (const symbol *p, int c, int limit, int n)
 
int skip_b_utf8 (const symbol *p, int c, int limit, int n)
 
int in_grouping_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int in_grouping_b_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping_b_U (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int in_grouping (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int in_grouping_b (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int out_grouping_b (struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
 
int eq_s (struct SN_env *z, int s_size, const symbol *s)
 
int eq_s_b (struct SN_env *z, int s_size, const symbol *s)
 
int eq_v (struct SN_env *z, const symbol *p)
 
int eq_v_b (struct SN_env *z, const symbol *p)
 
int find_among (struct SN_env *z, const struct among *v, int v_size, int(*)(struct SN_env *))
 
int find_among_b (struct SN_env *z, const struct among *v, int v_size, int(*)(struct SN_env *))
 
SNOWBALL_ERR replace_s (struct SN_env *z, int c_bra, int c_ket, int s_size, const symbol *s)
 
SNOWBALL_ERR slice_from_s (struct SN_env *z, int s_size, const symbol *s)
 
SNOWBALL_ERR slice_from_v (struct SN_env *z, const symbol *p)
 
SNOWBALL_ERR slice_del (struct SN_env *z)
 
SNOWBALL_ERR insert_s (struct SN_env *z, int bra, int ket, int s_size, const symbol *s)
 
SNOWBALL_ERR insert_v (struct SN_env *z, int bra, int ket, const symbol *p)
 
SNOWBALL_ERR slice_to (struct SN_env *z, symbol **p)
 
SNOWBALL_ERR assign_to (struct SN_env *z, symbol **p)
 
int len_utf8 (const symbol *p)
 

Macro Definition Documentation

◆ CAPACITY

#define CAPACITY (   p)    ((int *)(p))[-2]

Definition at line 16 of file snowball_runtime.h.

◆ HEAD

#define HEAD   2*sizeof(int)

Definition at line 6 of file snowball_runtime.h.

◆ SET_SIZE

#define SET_SIZE (   p,
 
)    ((int *)(p))[-1] = n

Definition at line 15 of file snowball_runtime.h.

◆ SIZE

#define SIZE (   p)    ((const int *)(p))[-1]

Definition at line 14 of file snowball_runtime.h.

◆ SNOWBALL_ERR

#define SNOWBALL_ERR   int

Definition at line 22 of file snowball_runtime.h.

Function Documentation

◆ assign_to()

SNOWBALL_ERR assign_to ( struct SN_env z,
symbol **  p 
)

◆ create_s()

symbol* create_s ( void  )

Definition at line 27 of file utilities.cc.

References CAPACITY, CREATE_SIZE, HEAD, p, SET_SIZE, and SNOWBALL_RETURN_OR_THROW.

◆ eq_s()

int eq_s ( struct SN_env z,
int  s_size,
const symbol s 
)

◆ eq_s_b()

int eq_s_b ( struct SN_env z,
int  s_size,
const symbol s 
)

◆ eq_v()

int eq_v ( struct SN_env z,
const symbol p 
)

Definition at line 248 of file utilities.cc.

References eq_s(), p, and SIZE.

◆ eq_v_b()

int eq_v_b ( struct SN_env z,
const symbol p 
)

Definition at line 252 of file utilities.cc.

References eq_s_b(), p, and SIZE.

Referenced by r_tidy(), and r_undouble().

◆ find_among()

int find_among ( struct SN_env z,
const struct among v,
int  v_size,
int(*)(struct SN_env *)  call_among_func 
)

◆ find_among_b()

int find_among_b ( struct SN_env z,
const struct among v,
int  v_size,
int(*)(struct SN_env *)  call_among_func 
)

Definition at line 322 of file utilities.cc.

References SN_env::af, SN_env::c, among::function, SN_env::lb, SN_env::p, among::result, among::s, among::s_size, and among::substring_i.

Referenced by r_AA(), r_aditzak(), r_adjectival(), r_adjective(), r_adjetiboak(), r_attached_pronoun(), r_case(), r_case_ending(), r_case_other(), r_case_special(), r_combo_suffix(), r_consonant_pair(), r_correlative(), r_degrees(), r_deriv(), r_derivational(), r_double(), r_emphasis(), r_ending(), r_endings(), r_et_condition(), r_factive(), r_final_apostrophe(), r_fix_chdz(), r_fix_conflicts(), r_fix_ending(), r_i_verb_suffix(), r_instrum(), r_izenak(), r_lengthen_V(), r_LONG(), r_LONGV(), r_main_suffix(), r_mark_cAsInA(), r_mark_DA(), r_mark_DAn(), r_mark_DUr(), r_mark_lAr(), r_mark_lArI(), r_mark_nA(), r_mark_ncA(), r_mark_ndA(), r_mark_ndAn(), r_mark_nU(), r_mark_nUn(), r_mark_nUz(), r_mark_possessives(), r_mark_sUn(), r_mark_sUnUz(), r_mark_yDU(), r_mark_ylA(), r_mark_ymUs_(), r_mark_ysA(), r_mark_yUm(), r_mark_yUz(), r_merged_numeral(), r_normalize_consonant(), r_Normalize_post(), r_noun(), r_noun_sfx(), r_nu(), r_other_endings(), r_other_suffix(), r_owned(), r_particle_etc(), r_perfective_gerund(), r_plur_owner(), r_plural(), r_plural_three_first_cases(), r_possessive(), r_post_process_last_consonants(), r_pronoun(), r_reflexive(), r_remove_category_1(), r_remove_category_2(), r_remove_category_3(), r_remove_command_suffixes(), r_remove_common_word_endings(), r_remove_endings(), r_remove_particle(), r_remove_plural_suffix(), r_remove_possessive_pronoun(), r_remove_question_suffixes(), r_remove_suffix(), r_remove_tense_suffix(), r_remove_vetrumai_urupukal(), r_residual_form(), r_residual_suffix(), r_respell(), r_sing_owner(), r_special_noun_endings(), r_standard_suffix(), r_step1(), r_step2(), r_step_0(), r_Step_1(), r_step_1(), r_Step_1a(), r_Step_1b(), r_Step_1c(), r_Step_2(), r_step_2a(), r_step_2b(), r_step_2c(), r_step_2d(), r_Step_3(), r_step_3(), r_Step_4(), r_step_4(), r_Step_5(), r_step_5a(), r_step_5b(), r_step_5c(), r_step_5d(), r_step_5e(), r_step_5f(), r_step_5g(), r_step_5h(), r_step_5i(), r_step_5j(), r_step_5k(), r_step_5l(), r_step_5m(), r_Step_6(), r_step_6(), r_Step_7(), r_step_7(), r_step_s1(), r_step_s10(), r_step_s2(), r_step_s3(), r_step_s4(), r_step_s5(), r_step_s6(), r_step_s7(), r_step_s8(), r_step_s9(), r_Suffix_Noun_Step1a(), r_Suffix_Noun_Step2a(), r_Suffix_Verb_Step1(), r_Suffix_Verb_Step2a(), r_Suffix_Verb_Step2b(), r_Suffix_Verb_Step2c(), r_t_plural(), r_tidy_up(), r_tolower(), r_ujn_suffix(), r_un_double(), r_undouble(), r_undouble_kpt(), r_uninflected(), r_v_ending(), r_verb(), r_verb_sfx(), r_verb_suffix(), r_vowel_suffix(), r_y_verb_suffix(), and Xapian::Internal::Snowball::Hindi::stem().

◆ in_grouping()

int in_grouping ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 190 of file utilities.cc.

References SN_env::c, SN_env::l, and SN_env::p.

◆ in_grouping_b()

int in_grouping_b ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 202 of file utilities.cc.

References SN_env::c, SN_env::lb, and SN_env::p.

◆ in_grouping_b_U()

int in_grouping_b_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ in_grouping_U()

int in_grouping_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ insert_s()

SNOWBALL_ERR insert_s ( struct SN_env z,
int  bra,
int  ket,
int  s_size,
const symbol s 
)

◆ insert_v()

SNOWBALL_ERR insert_v ( struct SN_env z,
int  bra,
int  ket,
const symbol p 
)

Definition at line 481 of file utilities.cc.

References insert_s(), p, and SIZE.

Referenced by r_lengthen_V().

◆ len_utf8()

int len_utf8 ( const symbol p)

◆ lose_s()

void lose_s ( symbol p)

Definition at line 38 of file utilities.cc.

◆ out_grouping()

int out_grouping ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 214 of file utilities.cc.

References SN_env::c, SN_env::l, and SN_env::p.

◆ out_grouping_b()

int out_grouping_b ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

Definition at line 226 of file utilities.cc.

References SN_env::c, SN_env::lb, and SN_env::p.

◆ out_grouping_b_U()

int out_grouping_b_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ out_grouping_U()

int out_grouping_U ( struct SN_env z,
const unsigned char *  s,
int  min,
int  max,
int  repeat 
)

◆ replace_s()

SNOWBALL_ERR replace_s ( struct SN_env z,
int  c_bra,
int  c_ket,
int  s_size,
const symbol s 
)

Definition at line 396 of file utilities.cc.

References SN_env::c, c_bra, c_ket, CAPACITY, increase_size(), SN_env::l, SN_env::p, among::s, among::s_size, SET_SIZE, SIZE, SNOWBALL_PROPAGATE_ERR, and SNOWBALL_RETURN_OK.

Referenced by Xapian::Internal::Snowball::Arabic::operator()(), Xapian::Internal::Snowball::Armenian::operator()(), Xapian::Internal::Snowball::Basque::operator()(), Xapian::Internal::Snowball::Catalan::operator()(), Xapian::Internal::Snowball::Danish::operator()(), Xapian::Internal::Snowball::Dutch::operator()(), Xapian::Internal::Snowball::DutchPorter::operator()(), Xapian::Internal::Snowball::Earlyenglish::operator()(), Xapian::Internal::Snowball::English::operator()(), Xapian::Internal::Snowball::Esperanto::operator()(), Xapian::Internal::Snowball::Estonian::operator()(), Xapian::Internal::Snowball::Finnish::operator()(), Xapian::Internal::Snowball::French::operator()(), Xapian::Internal::Snowball::German::operator()(), Xapian::Internal::Snowball::Greek::operator()(), Xapian::Internal::Snowball::Hindi::operator()(), Xapian::Internal::Snowball::Hungarian::operator()(), Xapian::Internal::Snowball::Indonesian::operator()(), Xapian::Internal::Snowball::Irish::operator()(), Xapian::Internal::Snowball::Italian::operator()(), Xapian::Internal::Snowball::Lithuanian::operator()(), Xapian::Internal::Snowball::Lovins::operator()(), Xapian::Internal::Snowball::Nepali::operator()(), Xapian::Internal::Snowball::Norwegian::operator()(), Xapian::Internal::Snowball::Polish::operator()(), Xapian::Internal::Snowball::Porter::operator()(), Xapian::Internal::Snowball::Portuguese::operator()(), Xapian::Internal::Snowball::Romanian::operator()(), Xapian::Internal::Snowball::Russian::operator()(), Xapian::Internal::Snowball::Serbian::operator()(), Xapian::Internal::Snowball::Spanish::operator()(), Xapian::Internal::Snowball::Swedish::operator()(), Xapian::Internal::Snowball::Tamil::operator()(), Xapian::Internal::Snowball::Turkish::operator()(), and Xapian::Internal::Snowball::Yiddish::operator()().

◆ skip_b_utf8()

int skip_b_utf8 ( const symbol p,
int  c,
int  limit,
int  n 
)

◆ skip_utf8()

int skip_utf8 ( const symbol p,
int  c,
int  limit,
int  n 
)

◆ slice_del()

SNOWBALL_ERR slice_del ( struct SN_env z)

Definition at line 450 of file utilities.cc.

References SN_env::bra, SN_env::c, SN_env::ket, SN_env::l, SN_env::p, SET_SIZE, SIZE, SLICE_CHECK, and SNOWBALL_RETURN_OK.

Referenced by r_aditzak(), r_adjectival(), r_adjective(), r_adjetiboak(), r_attached_pronoun(), r_case(), r_case_ending(), r_case_other(), r_consonant_pair(), r_correlative(), r_degrees(), r_deriv(), r_derivational(), r_e_ending(), r_elisions(), r_emphasis(), r_en_ending(), r_ending(), r_endings(), r_factive(), r_fix_ending(), r_i_plural(), r_i_verb_suffix(), r_initial_morph(), r_instrum(), r_izenak(), r_Lose_infix(), r_Lose_prefix(), r_main_suffix(), r_Normalize_pre(), r_noun(), r_noun_sfx(), r_nu(), r_other_endings(), r_other_suffix(), r_owned(), r_particle_etc(), r_perfective_gerund(), r_plur_owner(), r_plural(), r_plural_three_first_cases(), r_possessive(), r_postlude(), r_Prefix_Step2(), r_Prefix_Step3a_Noun(), r_Prefix_Step3b_Noun(), r_prelude(), r_pronoun(), r_reflexive(), r_remove_category_1(), r_remove_category_2(), r_remove_category_3(), r_remove_command_suffixes(), r_remove_common_word_endings(), r_remove_endings(), r_remove_first_order_prefix(), r_remove_particle(), r_remove_plural_suffix(), r_remove_possessive_pronoun(), r_remove_pronoun_prefixes(), r_remove_proper_noun_suffix(), r_remove_question_prefixes(), r_remove_second_order_prefix(), r_remove_suffix(), r_remove_tense_suffix(), r_remove_vetrumai_urupukal(), r_residual_form(), r_residual_suffix(), r_sing_owner(), r_standard_suffix(), r_stem_nominal_verb_suffixes(), r_stem_noun_suffixes(), r_stem_suffix_chain_before_ki(), r_step1(), r_step2(), r_step_0(), r_Step_1(), r_Step_1a(), r_Step_1b(), r_Step_1c(), r_Step_2(), r_step_2a(), r_step_2b(), r_step_2c(), r_step_2d(), r_Step_3(), r_step_3(), r_Step_4(), r_step_4(), r_Step_5(), r_step_5a(), r_Step_5a(), r_step_5b(), r_Step_5b(), r_step_5c(), r_step_5d(), r_step_5e(), r_step_5f(), r_step_5g(), r_step_5h(), r_step_5i(), r_step_5j(), r_step_5k(), r_step_5l(), r_step_5m(), r_step_6(), r_step_7(), r_step_s1(), r_step_s10(), r_step_s2(), r_step_s3(), r_step_s4(), r_step_s5(), r_step_s6(), r_step_s7(), r_step_s8(), r_step_s9(), r_Suffix_Noun_Step1a(), r_Suffix_Noun_Step1b(), r_Suffix_Noun_Step2a(), r_Suffix_Noun_Step2b(), r_Suffix_Noun_Step2c1(), r_Suffix_Noun_Step2c2(), r_Suffix_Noun_Step3(), r_Suffix_Verb_Step1(), r_Suffix_Verb_Step2a(), r_Suffix_Verb_Step2b(), r_Suffix_Verb_Step2c(), r_t_plural(), r_tidy(), r_tidy_up(), r_ujn_suffix(), r_un_double(), r_undouble(), r_verb(), r_verb_sfx(), r_verb_suffix(), r_vowel_suffix(), r_y_verb_suffix(), Xapian::Internal::Snowball::Hindi::stem(), Xapian::Internal::Snowball::Portuguese::stem(), and Xapian::Internal::Snowball::Russian::stem().

◆ slice_from_s()

SNOWBALL_ERR slice_from_s ( struct SN_env z,
int  s_size,
const symbol s 
)

Definition at line 439 of file utilities.cc.

References SN_env::bra, SN_env::ket, REPLACE_S, among::s, among::s_size, SLICE_CHECK, and SNOWBALL_RETURN_OK.

Referenced by r_adjetiboak(), r_append_U_to_stems_ending_with_d_or_g(), r_attached_pronoun(), r_canonical_form(), r_case_other(), r_case_special(), r_cleaning(), r_combo_suffix(), r_cyr_to_lat(), r_deriv(), r_exception1(), r_final_apostrophe(), r_fix_chdz(), r_fix_conflicts(), r_fix_ending(), r_fix_gd(), r_fix_va_start(), r_initial_apostrophe(), r_initial_morph(), r_izenak(), r_lengthen_V(), r_Lose_infix(), r_Lose_prefix(), r_main_suffix(), r_mark_regions(), r_norm(), r_normalize_consonant(), r_Normalize_post(), r_Normalize_pre(), r_other_suffix(), r_owned(), r_plur_owner(), r_plural(), r_plural_three_first_cases(), r_possessive(), r_post_process_last_consonants(), r_postlude(), r_Prefix_Step1(), r_Prefix_Step3_Verb(), r_Prefix_Step3b_Noun(), r_Prefix_Step4_Verb(), r_prelude(), r_remove_common_word_endings(), r_remove_endings(), r_remove_first_order_prefix(), r_remove_plural_suffix(), r_remove_question_suffixes(), r_remove_tense_suffix(), r_remove_um(), r_remove_vetrumai_urupukal(), r_residual_form(), r_residual_suffix(), r_respell(), r_sing_owner(), r_special_noun_endings(), r_standard_suffix(), r_step_0(), r_Step_1(), r_step_1(), r_Step_1a(), r_Step_1b(), r_Step_1c(), r_Step_2(), r_step_2b(), r_step_2c(), r_step_2d(), r_Step_3(), r_step_3(), r_Step_4(), r_step_4(), r_step_5a(), r_step_5b(), r_step_5c(), r_step_5d(), r_step_5e(), r_step_5f(), r_step_5g(), r_step_5h(), r_step_5i(), r_step_5j(), r_step_5k(), r_step_5l(), r_step_5m(), r_Step_6(), r_step_6(), r_Step_7(), r_step_s1(), r_step_s10(), r_step_s2(), r_step_s3(), r_step_s4(), r_step_s5(), r_step_s6(), r_step_s7(), r_step_s8(), r_step_s9(), r_Suffix_All_alef_maqsura(), r_tolower(), r_un_accent(), r_undouble_kpt(), r_v_ending(), r_verb(), r_verb_exceptions(), slice_from_v(), Xapian::Internal::Snowball::French::stem(), Xapian::Internal::Snowball::Porter::stem(), and Xapian::Internal::Snowball::Russian::stem().

◆ slice_from_v()

SNOWBALL_ERR slice_from_v ( struct SN_env z,
const symbol p 
)

Definition at line 446 of file utilities.cc.

References p, SIZE, and slice_from_s().

◆ slice_to()

SNOWBALL_ERR slice_to ( struct SN_env z,
symbol **  p 
)