xapian-core
2.0.0
languages
algorithms
lithuanian.h
Go to the documentation of this file.
1
/* Generated from lithuanian.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
Lithuanian
:
public
Xapian::StemImplementation
{
11
public
:
12
struct
SN_local
{
13
struct
SN_env
z
;
14
int
i_p1
;
15
};
16
17
private
:
18
SN_local
zlocal
= {};
19
20
void
close_env
() {
21
struct
SN_env
* z = &(
zlocal
.
z
);
22
lose_s
(z->
p
);
23
}
24
25
static
int
stem
(
struct
SN_env
* z);
26
27
public
:
28
Lithuanian
() {
29
struct
SN_env
* z = &(
zlocal
.
z
);
30
z->
p
=
create_s
();
31
}
32
33
~Lithuanian
() {
34
close_env
();
35
}
36
37
std::string
operator()
(
const
std::string& word)
override
{
38
struct
SN_env
* z = &(
zlocal
.
z
);
39
const
symbol
* s =
reinterpret_cast<
const
symbol
*
>
(word.data());
40
replace_s
(z, 0, z->
l
, word.size(), s);
41
z->
c
= 0;
42
Xapian::Internal::Snowball::Lithuanian::stem
(z);
43
return
std::string(
reinterpret_cast<
const
char
*
>
(z->
p
),
SIZE
(z->
p
));
44
}
45
46
std::string
get_description
()
const override
{
47
return
"lithuanian"
;
48
}
49
};
50
51
}
symbol
unsigned char symbol
Definition:
api.h:4
Xapian::Internal::Snowball::Lithuanian
Definition:
lithuanian.h:10
Xapian::Internal::Snowball::Lithuanian::~Lithuanian
~Lithuanian()
Definition:
lithuanian.h:33
Xapian::Internal::Snowball::Lithuanian::close_env
void close_env()
Definition:
lithuanian.h:20
Xapian::Internal::Snowball::Lithuanian::stem
static int stem(struct SN_env *z)
Definition:
lithuanian.cc:678
Xapian::Internal::Snowball::Lithuanian::zlocal
SN_local zlocal
Definition:
lithuanian.h:18
Xapian::Internal::Snowball::Lithuanian::Lithuanian
Lithuanian()
Definition:
lithuanian.h:28
Xapian::Internal::Snowball::Lithuanian::get_description
std::string get_description() const override
Return a string describing this object.
Definition:
lithuanian.h:46
Xapian::Internal::Snowball::Lithuanian::operator()
std::string operator()(const std::string &word) override
Stem the specified word.
Definition:
lithuanian.h:37
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::Lithuanian::SN_local
Definition:
lithuanian.h:12
Xapian::Internal::Snowball::Lithuanian::SN_local::i_p1
int i_p1
Definition:
lithuanian.h:14
Xapian::Internal::Snowball::Lithuanian::SN_local::z
struct SN_env z
Definition:
lithuanian.h:13
Generated by
Doxygen 1.9.1