1
.\" Hey, EMACS: -*- nroff -*-
2
.TH RULEXDB_SUBSCRIBE_RULE 3 "February 19, 2012"
4
rulexdb_subscribe_rule \- store a new rule into the rulex database
9
.BI "int rulexdb_subscribe_rule(RULEXDB *" rulexdb \
10
", const char *" src ", int " rule_type ", unsigned int " position );
14
.BR rulexdb_subscribe_rule ()
15
function adds a new rule to the specified ruleset in the database
22
points to the text representation of the rule to be added.
26
specifies the rule type. It may accept one of the following values:
29
The rule is the word classifier and should be added to the
30
\fBClassifiers\fP dataset.
33
The rule should be added to the \fBPrefix detectors\fP ruleset.
36
The rule should be treated as a general rule and added to
37
the \fBGeneral\fP rules dataset.
40
The rule is a correction rule and should be added to the
41
\fBCorrectors\fP dataset.
45
defines position of the newly added rule in the ruleset. If 0, this
46
rule is appended at the end of ruleset, otherwise the new rule will be
47
inserted at the specified position.
50
.BR rulexdb_subscribe_rule ()
53
which is zero when success or non-zero error code otherwise.
57
Referenced database has not been opened, internal data structures are
58
corrupted or some other general failure has occurred.
63
has a non-zero value, but it is out of the ruleset range that must be
74
The database is not opened for updating.
76
.BR rulexdb_classify (3),
78
.BR rulexdb_dataset_name (3),
79
.BR rulexdb_discard_dictionary (3),
80
.BR rulexdb_discard_ruleset (3),
81
.BR rulexdb_fetch_rule (3),
82
.BR rulexdb_lexbase (3),
83
.BR rulexdb_load_ruleset (3),
85
.BR rulexdb_remove_item (3),
86
.BR rulexdb_remove_rule (3),
87
.BR rulexdb_remove_this_item (3),
88
.BR rulexdb_retrieve_item (3),
89
.BR rulexdb_search (3),
91
.BR rulexdb_subscribe_item (3)
93
Igor B. Poretsky <poretsky@mlbox.ru>.