Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
normalizer.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 2 -*- */
2 /*
3  Copyright(C) 2012 Brazil
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License version 2.1 as published by the Free Software Foundation.
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 #ifndef GROONGA_NORMALIER_H
19 #define GROONGA_NORMALIER_H
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  */
45  const char *name_ptr,
46  int name_length,
47  grn_proc_func *init,
48  grn_proc_func *next,
50 
51 #ifdef __cplusplus
52 } /* extern "C" */
53 #endif /* __cplusplus */
54 
55 #endif /* GROONGA_NORMALIER_H */