Debian Codegraph @

lib/grn_token.h

raw symbols SCIP
1 /*
2 Copyright(C) 2009-2018 Brazil
3 Copyright(C) 2018-2020 Sutou Kouhei <[email protected]>
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 as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #pragma once
21
22 #include "grn_ctx.h"
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 struct _grn_token {
29 grn_obj data;
30 grn_token_status status;
31 uint64_t source_offset;
32 uint32_t source_length;
33 uint32_t source_first_character_length;
34 bool have_overlap;
35 grn_obj metadata;
36 bool force_prefix_search;
37 uint32_t position;
38 float weight;
39 };
40
41 grn_rc
42 grn_token_init(grn_ctx *ctx, grn_token *token);
43 grn_rc
44 grn_token_init_deep(grn_ctx *ctx, grn_token *token);
45 grn_rc
46 grn_token_fin(grn_ctx *ctx, grn_token *token);
47 grn_rc
48 grn_token_reset(grn_ctx *ctx, grn_token *token);
49 grn_rc
50 grn_token_copy(grn_ctx *ctx, grn_token *token, grn_token *source);
51
52 #ifdef __cplusplus
53 }
54 #endif