22 #ifndef XAPIAN_INCLUDED_STEMINTERNAL_H 23 #define XAPIAN_INCLUDED_STEMINTERNAL_H 34 #define HEAD (2 * sizeof(int)) 46 if (p) std::free(reinterpret_cast<char *>(p) -
HEAD);
56 int c, l,
lb, bra, ket;
82 static int skip_utf8(
const symbol * p,
int c,
int lb,
int l,
int n);
86 static symbol * create_s();
89 int get_b_utf8(
int * slot);
91 int in_grouping_U(
const unsigned char *
s,
int min,
int max,
int repeat);
92 int in_grouping_b_U(
const unsigned char * s,
int min,
int max,
int repeat);
93 int out_grouping_U(
const unsigned char * s,
int min,
int max,
int repeat);
94 int out_grouping_b_U(
const unsigned char * s,
int min,
int max,
int repeat);
97 int eq_s_b(
int s_size,
const symbol * s);
101 int find_among(
const symbol *pool,
const struct among * v,
int v_size,
103 int find_among_b(
const symbol *pool,
const struct among * v,
int v_size,
107 int slice_from_s(
int s_size,
const symbol * s);
112 void insert_s(
int c_bra,
int c_ket,
int s_size,
const symbol * s);
114 insert_s(c_bra, c_ket,
SIZE(v), v);
120 int len_utf8(
const symbol * v);
123 void debug(
int number,
int line_count);
129 : p(create_s()), c(0), l(0), lb(0), bra(0), ket(0) { }
135 virtual std::string operator()(
const std::string & word);
138 virtual int stem() = 0;
143 #endif // XAPIAN_INCLUDED_STEMINTERNAL_H The Xapian namespace contains public interfaces for the Xapian library.
static void SET_CAPACITY(symbol *p, int n)
int eq_v_b(const symbol *v)
Cast a pointer we know is suitably aligned.
std::enable_if< std::is_const< typename std::remove_pointer< U >::type >::value, T >::type alignment_cast(U ptr)
Cast a pointer we know is suitably aligned.
static int CAPACITY(const symbol *p)
void insert_v(int c_bra, int c_ket, const symbol *v)
static int SIZE(const symbol *p)
int(* among_function)(Xapian::StemImplementation *)
int eq_v(const symbol *v)
Class representing a stemming algorithm implementation.
int slice_from_v(const symbol *v)
static void SET_SIZE(symbol *p, int n)
SnowballStemImplementation()
Perform initialisation common to all Snowball stemmers.