-
Notifications
You must be signed in to change notification settings - Fork 21
/
symbol-table.h
110 lines (85 loc) · 2.15 KB
/
symbol-table.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* varnam-symbol-table.h
*
* Copyright (C) Navaneeth.K.N
*
* This is part of libvarnam. See LICENSE.txt for the license
*/
#ifndef VARNAM_SYMBOL_TABLE_H_INCLUDED_120215
#define VARNAM_SYMBOL_TABLE_H_INCLUDED_120215
#include "vtypes.h"
#include "varray.h"
/**
* checks the schema availability. this function will create it when necessary
**/
int
ensure_schema_exists(varnam *handle, char **msg);
/**
* Starts buffering
**/
int
vst_start_buffering(varnam *handle);
/**
* Persist the token
**/
int
vst_persist_token(
varnam *handle,
const char *pattern,
const char *value1,
const char *value2,
const char *value3,
const char *tag,
int token_type,
int match_type,
int priority,
int accept_condition);
int
vst_persist_stemrule(varnam *handle, const char* old_ending, const char* new_ending);
int
vst_persist_stem_exception(varnam *handle, const char *rule, const char *exception);
/**
* Flushes changes to disk
**/
int
vst_flush_changes(
varnam *handle);
/**
* Rollback changes
**/
int
vst_discard_changes(varnam *handle);
/**
* Reads VARNAM_TOKEN_VIRAMA and assigns that to output
**/
int
vst_get_virama(varnam* handle, struct token **output);
int
vst_get_all_tokens (varnam* handle, int token_type, varray *tokens);
/**
* Adds supplied metadata
**/
int
vst_add_metadata (varnam *handle, const char* key, const char* value);
/* Tokenizes the input and add the tokens into result. Result will point to a multidimensional array
* where each element will be an array of vtoken* */
int
vst_tokenize (varnam *handle, const char *input, int tokenize_using, int match_type, varray *result);
void
print_tokens_array(varray *tokens);
void
destroy_all_statements(struct varnam_internal* vi);
int
vst_make_prefix_tree (varnam *handle);
int
vst_has_stemrules (varnam *handle);
int
vst_get_last_syllable (varnam *handle, strbuf *string, strbuf *syllable);
int
vst_check_exception(varnam *handle, strbuf *word_buffer, strbuf *end_buffer);
int
vst_get_stem(varnam* handle, strbuf* old_ending, strbuf *new_ending);
int
vst_stamp_version (varnam *handle);
int
vst_load_scheme_details(varnam *handle, vscheme_details *output);
#endif