rulex

Форк
0
/
rulexdb_subscribe_rule.3 
93 строки · 2.4 Кб
1
.\"                                      Hey, EMACS: -*- nroff -*-
2
.TH RULEXDB_SUBSCRIBE_RULE 3 "February 19, 2012"
3
.SH NAME
4
rulexdb_subscribe_rule \- store a new rule into the rulex database
5
.SH SYNOPSIS
6
.nf
7
.B #include <rulexdb.h>
8
.sp
9
.BI "int rulexdb_subscribe_rule(RULEXDB *" rulexdb \
10
", const char *" src ", int " rule_type ", unsigned int " position );
11
.fi
12
.SH DESCRIPTION
13
The
14
.BR rulexdb_subscribe_rule ()
15
function adds a new rule to the specified ruleset in the database
16
referenced by
17
.I rulexdb
18
argument.
19
.PP
20
The argument
21
.I src
22
points to the text representation of the rule to be added.
23
.PP
24
The argument
25
.I rule_type
26
specifies the rule type. It may accept one of the following values:
27
.TP
28
.B RULEXDB_LEXCLASS
29
The rule is the word classifier and should be added to the
30
\fBClassifiers\fP dataset.
31
.TP
32
.B RULEXDB_PREFIX
33
The rule should be added to the \fBPrefix detectors\fP ruleset.
34
.TP
35
.B RULEXDB_RULE
36
The rule should be treated as a general rule and added to
37
the \fBGeneral\fP rules dataset.
38
.TP
39
.B RULEXDB_CORRECTOR
40
The rule is a correction rule and should be added to the
41
\fBCorrectors\fP dataset.
42
.PP
43
The argument
44
.I position
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.
48
.SH "RETURN VALUE"
49
The
50
.BR rulexdb_subscribe_rule ()
51
function returns
52
.B RULEXDB_SUCCESS
53
which is zero when success or non-zero error code otherwise.
54
.SH ERRORS
55
.TP
56
.B RULEXDB_FAILURE
57
Referenced database has not been opened, internal data structures are
58
corrupted or some other general failure has occurred.
59
.TP
60
.B RULEXDB_EINVKEY
61
The argument
62
.I position
63
has a non-zero value, but it is out of the ruleset range that must be
64
continuous.
65
.TP
66
.B RULEXDB_EPARM
67
The argument
68
.I rulexdb
69
or
70
.I rule_type
71
has an invalid value.
72
.TP
73
.B RULEXDB_EACCESS
74
The database is not opened for updating.
75
.SH SEE ALSO
76
.BR rulexdb_classify (3),
77
.BR rulexdb_close (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),
84
.BR rulexdb_open (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),
90
.BR rulexdb_seq (3),
91
.BR rulexdb_subscribe_item (3)
92
.SH AUTHOR
93
Igor B. Poretsky <poretsky@mlbox.ru>.
94

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.