xapian-core
2.0.0
languages
algorithms
romanian.h
Go to the documentation of this file.
1
/* Generated from romanian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
2
3
#include <
xapian/stem.h
>
4
5
#define SNOWBALL_RUNTIME_THROW_EXCEPTIONS
6
#include "
languages/snowball_runtime.h
"
7
8
namespace
Xapian::Internal::Snowball
{
9
10
class
Romanian
:
public
Xapian::StemImplementation
{
11
public
:
12
struct
SN_local
{
13
struct
SN_env
z
;
14
int
i_p2
;
15
int
i_p1
;
16
int
i_pV
;
17
bool
b_standard_suffix_removed
;
18
};
19
20
private
:
21
SN_local
zlocal
= {};
22
23
void
close_env
() {
24
struct
SN_env
* z = &(
zlocal
.
z
);
25
lose_s
(z->
p
);
26
}
27
28
static
int
stem
(
struct
SN_env
* z);
29
30
public
:
31
Romanian
() {
32
struct
SN_env
* z = &(
zlocal
.
z
);
33
z->
p
=
create_s
();
34
}
35
36
~Romanian
() {
37
close_env
();
38
}
39
40
std::string
operator()
(
const
std::string& word)
override
{
41
struct
SN_env
* z = &(
zlocal
.
z
);
42
const
symbol
* s =
reinterpret_cast<
const
symbol
*
>
(word.data());
43
replace_s
(z, 0, z->
l
, word.size(), s);
44
z->
c
= 0;
45
Xapian::Internal::Snowball::Romanian::stem
(z);
46
return
std::string(
reinterpret_cast<
const
char
*
>
(z->
p
),
SIZE
(z->
p
));
47
}
48
49
std::string
get_description
()
const override
{
50
return
"romanian"
;
51
}
52
};
53
54
}
symbol
unsigned char symbol
Definition:
api.h:4
Xapian::Internal::Snowball::Romanian
Definition:
romanian.h:10
Xapian::Internal::Snowball::Romanian::close_env
void close_env()
Definition:
romanian.h:23
Xapian::Internal::Snowball::Romanian::Romanian
Romanian()
Definition:
romanian.h:31
Xapian::Internal::Snowball::Romanian::get_description
std::string get_description() const override
Return a string describing this object.
Definition:
romanian.h:49
Xapian::Internal::Snowball::Romanian::stem
static int stem(struct SN_env *z)
Definition:
romanian.cc:897
Xapian::Internal::Snowball::Romanian::~Romanian
~Romanian()
Definition:
romanian.h:36
Xapian::Internal::Snowball::Romanian::operator()
std::string operator()(const std::string &word) override
Stem the specified word.
Definition:
romanian.h:40
Xapian::Internal::Snowball::Romanian::zlocal
SN_local zlocal
Definition:
romanian.h:21
Xapian::StemImplementation
Class representing a stemming algorithm implementation.
Definition:
stem.h:41
SIZE
#define SIZE(p)
Definition:
header.h:21
lose_s
void lose_s(byte *p)
Definition:
utilities.cc:38
create_s
byte * create_s(int n)
Xapian::Internal::Snowball
Definition:
arabic.h:8
snowball_runtime.h
replace_s
SNOWBALL_ERR replace_s(struct SN_env *z, int c_bra, int c_ket, int s_size, const symbol *s)
Definition:
utilities.cc:396
stem.h
stemming algorithms
SN_env
Definition:
api.h:15
SN_env::p
symbol * p
Definition:
api.h:16
SN_env::c
int c
Definition:
api.h:17
SN_env::l
int l
Definition:
api.h:17
Xapian::Internal::Snowball::Romanian::SN_local
Definition:
romanian.h:12
Xapian::Internal::Snowball::Romanian::SN_local::z
struct SN_env z
Definition:
romanian.h:13
Xapian::Internal::Snowball::Romanian::SN_local::i_p1
int i_p1
Definition:
romanian.h:15
Xapian::Internal::Snowball::Romanian::SN_local::b_standard_suffix_removed
bool b_standard_suffix_removed
Definition:
romanian.h:17
Xapian::Internal::Snowball::Romanian::SN_local::i_pV
int i_pV
Definition:
romanian.h:16
Xapian::Internal::Snowball::Romanian::SN_local::i_p2
int i_p2
Definition:
romanian.h:14
Generated by
Doxygen 1.9.1