Groonga
Loading...
Searching...
No Matches
normalizer.h
Go to the documentation of this file.
1
/*
2
Copyright(C) 2012-2016 Brazil
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) any later version.
8
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Lesser General Public License for more details.
13
14
You should have received a copy of the GNU Lesser General Public
15
License along with this library; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#pragma once
20
21
#include <stddef.h>
22
23
#include <
groonga/plugin.h
>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
/* __cplusplus */
28
29
/*
30
grn_normalizer_register() registers a normalizer to the database
31
which is associated with `ctx'. `name_ptr' and `name_length' specify
32
the normalizer name. `name_length' can be `-1'. `-1' means that
33
`name_ptr` is NULL-terminated. Alphabetic letters ('A'-'Z' and
34
'a'-'z'), digits ('0'-'9') and an underscore ('_') are capable
35
characters. `init', `next' and `fin' specify the normalizer
36
functions. `init' is called for initializing a tokenizer for a
37
document or query. `next' is called for extracting tokens one by
38
one. `fin' is called for finalizing a
39
tokenizer. grn_tokenizer_register() returns GRN_SUCCESS on success,
40
an error code on failure. See "groonga.h" for more details of
41
grn_proc_func and grn_user_data, that is used as an argument of
42
grn_proc_func.
43
*/
44
GRN_PLUGIN_EXPORT
grn_rc
grn_normalizer_register
(
grn_ctx
*ctx,
45
const
char
*name_ptr,
46
int
name_length,
47
grn_proc_func
*init,
48
grn_proc_func
*next,
49
grn_proc_func
*fin);
50
51
#ifdef __cplusplus
52
}
/* extern "C" */
53
#endif
/* __cplusplus */
grn_rc
grn_rc
Definition
groonga.h:61
grn_proc_func
grn_obj * grn_proc_func(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
Definition
groonga.h:346
grn_normalizer_register
GRN_PLUGIN_EXPORT grn_rc grn_normalizer_register(grn_ctx *ctx, const char *name_ptr, int name_length, grn_proc_func *init, grn_proc_func *next, grn_proc_func *fin)
plugin.h
GRN_PLUGIN_EXPORT
#define GRN_PLUGIN_EXPORT
Definition
plugin.h:50
_grn_ctx
Definition
groonga.h:351
include
groonga
normalizer.h
Generated by
1.9.8