Groonga
Loading...
Searching...
No Matches
highlighter.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2018 Brazil
3 Copyright(C) 2023 Sutou Kouhei <kou@clear-code.com>
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#ifdef __cplusplus
23extern "C" {
24#endif
25
26typedef struct _grn_highlighter grn_highlighter;
27
34 grn_highlighter *highlighter,
35 const char *text,
36 int64_t text_length,
37 grn_obj *output);
40 grn_highlighter *highlighter,
41 grn_obj *lexicon);
46 grn_highlighter *highlighter,
47 bool mode);
48GRN_API bool
50 grn_highlighter *highlighter);
53 grn_highlighter *highlighter,
54 const char *tag,
55 int64_t tag_length);
56GRN_API const char *
58 grn_highlighter *highlighter);
61 grn_highlighter *highlighter,
62 const char *tag,
63 int64_t tag_length);
64GRN_API const char *
66 grn_highlighter *highlighter);
69 grn_highlighter *highlighter,
70 const char *normalizers,
71 int64_t normalizers_length);
76 grn_highlighter *highlighter,
77 bool html_mode);
78GRN_API bool
82 grn_highlighter *highlighter,
83 const char *keyword,
84 int64_t keyword_length);
89 grn_highlighter *highlighter,
90 const char *tag,
91 int64_t tag_length);
94 grn_highlighter *highlighter,
95 const char *tag,
96 int64_t tag_length);
99
100#ifdef __cplusplus
101}
102#endif
grn_rc
Definition groonga.h:61
#define GRN_API
Definition groonga.h:39
GRN_API bool grn_highlighter_get_html_mode(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_rc grn_highlighter_clear_keywords(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_obj * grn_highlighter_get_lexicon(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API const char * grn_highlighter_get_default_close_tag(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_rc grn_highlighter_add_keyword(grn_ctx *ctx, grn_highlighter *highlighter, const char *keyword, int64_t keyword_length)
GRN_API grn_rc grn_highlighter_highlight(grn_ctx *ctx, grn_highlighter *highlighter, const char *text, int64_t text_length, grn_obj *output)
GRN_API grn_rc grn_highlighter_set_sequential_class_tag_mode(grn_ctx *ctx, grn_highlighter *highlighter, bool mode)
GRN_API grn_rc grn_highlighter_set_lexicon(grn_ctx *ctx, grn_highlighter *highlighter, grn_obj *lexicon)
GRN_API bool grn_highlighter_get_sequential_class_tag_mode(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API const char * grn_highlighter_get_default_open_tag(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_rc grn_highlighter_set_default_close_tag(grn_ctx *ctx, grn_highlighter *highlighter, const char *tag, int64_t tag_length)
GRN_API grn_obj * grn_highlighter_get_normalizers(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_rc grn_highlighter_add_open_tag(grn_ctx *ctx, grn_highlighter *highlighter, const char *tag, int64_t tag_length)
GRN_API grn_highlighter * grn_highlighter_open(grn_ctx *ctx)
GRN_API grn_rc grn_highlighter_set_html_mode(grn_ctx *ctx, grn_highlighter *highlighter, bool html_mode)
GRN_API grn_rc grn_highlighter_set_normalizers(grn_ctx *ctx, grn_highlighter *highlighter, const char *normalizers, int64_t normalizers_length)
struct _grn_highlighter grn_highlighter
Definition highlighter.h:26
GRN_API grn_rc grn_highlighter_close(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_rc grn_highlighter_clear_tags(grn_ctx *ctx, grn_highlighter *highlighter)
GRN_API grn_rc grn_highlighter_add_close_tag(grn_ctx *ctx, grn_highlighter *highlighter, const char *tag, int64_t tag_length)
GRN_API grn_rc grn_highlighter_set_default_open_tag(grn_ctx *ctx, grn_highlighter *highlighter, const char *tag, int64_t tag_length)
Definition groonga.h:351
Definition groonga.h:919