1
.\" Hey, EMACS: -*- nroff -*-
2
.TH RULEXDB_SEARCH 3 "February 20, 2012"
4
rulexdb_search \- search rulex database for specified word
9
.BI "int rulexdb_search(RULEXDB *" rulexdb ", const char *" key \
10
", char *" value ", int " flags );
15
function searches the database referenced by
17
argument and tries to guess pronunciation for the word specified by
20
argument according to the acquired info. The resulting string is
21
placed into the buffer pointed by
23
argument. This buffer must have enough space for it. When no useful
24
info is found, the original word is copied to the
30
At first search is performed in the \fBExplicit\fP dictionary. If it
31
succeeds, the result is returned and procedure exits
32
successfully. Otherwise the word is treated as an implicit form and
33
program tries to guess its base and find it in the \fBImplicit\fP
34
dictionary. If this process succeeds, the pronunciation string is
35
constructed according to the acquired data and procedure exits
36
successfully. At last, the word is matched against general rules. If
37
no match succeeds, then program exits with
39
code, returning the original word as a result.
41
If this process appears to be not fully unsuccessful and some
42
information was found in the database, then the resulting string is
43
matched against correction rules and the first matched one is applied
46
The last argument specifies which steps of the described process are
47
to be performed. It consists of the following flags which may be
49
to form wanted search mode:
52
Search the word in the exceptions dictionary.
55
Try to treat specified word as an implicit form.
58
Try to apply general rules.
60
Zero value (no flags) means that full search (all stages) should be
67
which is zero upon success, positive value
69
when specified word was not found, or
70
negative error code if something is wrong.
74
Referenced database has not been opened, internal data structures are
75
corrupted or some other general failure has occurred.
78
Internal memory allocation error.
84
Invalid parameters are specified.
86
.BR rulexdb_classify (3),
88
.BR rulexdb_dataset_name (3),
89
.BR rulexdb_discard_dictionary (3),
90
.BR rulexdb_discard_ruleset (3),
91
.BR rulexdb_fetch_rule (3),
92
.BR rulexdb_lexbase (3),
93
.BR rulexdb_load_ruleset (3),
95
.BR rulexdb_remove_item (3),
96
.BR rulexdb_remove_rule (3),
97
.BR rulexdb_remove_this_item (3),
98
.BR rulexdb_retrieve_item (3),
100
.BR rulexdb_subscribe_item (3),
101
.BR rulexdb_subscribe_rule (3)
103
Igor B. Poretsky <poretsky@mlbox.ru>.