rulex

Форк
0
/
rulexdb_subscribe_item.3 
102 строки · 2.7 Кб
1
.\"                                      Hey, EMACS: -*- nroff -*-
2
.TH RULEXDB_SUBSCRIBE_ITEM 3 "February 19, 2012"
3
.SH NAME
4
rulexdb_subscribe_item \- put new dictionary item into the rulex database
5
.SH SYNOPSIS
6
.nf
7
.B #include <rulexdb.h>
8
.sp
9
.BI "int rulexdb_subscribe_item(RULEXDB *" rulexdb \
10
", const char *" key ", const char *" value ", int " item_type \
11
", int " overwrite );
12
.fi
13
.SH DESCRIPTION
14
The
15
.BR rulexdb_subscribe_item ()
16
function inserts new item into one of the dictionary datasets in the
17
database referenced by
18
.I rulexdb
19
argument.
20
.PP
21
The argument
22
.I key
23
points to a text string containing the original word.
24
.PP
25
The argument
26
.I value
27
points to the corresponding pronunciation string.
28
.PP
29
The argument
30
.I item_type
31
specifies target dataset. It may accept one of the following values:
32
.TP
33
.B RULEXDB_LEXBASE
34
The item represents a lexical base, therefore should be inserted into
35
the \fBImplicit\fP dictionary.
36
.TP
37
.B RULEXDB_EXCEPTION
38
Explicit item that should be inserted into the \fBExplicit\fP
39
dictionary.
40
.TP
41
.B RULEXDB_DEFAULT
42
Target dictionary should be guessed according to specified key: if it
43
represents any lexical base, then \fBImplicit\fP dictionary will be
44
chosen, otherwise the \fBExplicit\fP dictionary will be used. If key
45
word is recognized as a lexical base, but the record for this key
46
already exist in the \fBImplicit\fP dictionary, then \fBExplicit\fP
47
dictionary will be tried instead.
48
.PP
49
The argument
50
.I overwrite
51
If true (non-zero) the new item will replace already existing one with
52
the same key if any. Otherwise the new item will not be stored.
53
.SH "RETURN VALUE"
54
The
55
.BR rulexdb_subscribe_item ()
56
function returns
57
.B RULEXDB_SUCCESS
58
which is zero when specified item was successfully subscribed,
59
positive value
60
.B RULEXDB_SPECIAL
61
when specified key already exists in the dictionary, or
62
negative error code otherwise.
63
.SH ERRORS
64
.TP
65
.B RULEXDB_FAILURE
66
Referenced database has not been opened, internal data structures are
67
corrupted or some other general failure has occurred.
68
.TP
69
.B RULEXDB_EINVKEY
70
Invalid key specified.
71
.TP
72
.B RULEXDB_EINVREC
73
Invalid pronunciation string specified.
74
.TP
75
.B RULEXDB_EPARM
76
The argument
77
.I rulexdb
78
or
79
.I item_type
80
has an invalid value.
81
.TP
82
.B RULEXDB_EACCESS
83
The database is not opened for updating.
84
.SH SEE ALSO
85
.BR rulexdb_classify (3),
86
.BR rulexdb_close (3),
87
.BR rulexdb_dataset_name (3),
88
.BR rulexdb_discard_dictionary (3),
89
.BR rulexdb_discard_ruleset (3),
90
.BR rulexdb_fetch_rule (3),
91
.BR rulexdb_lexbase (3),
92
.BR rulexdb_load_ruleset (3),
93
.BR rulexdb_open (3),
94
.BR rulexdb_remove_item (3),
95
.BR rulexdb_remove_rule (3),
96
.BR rulexdb_remove_this_item (3),
97
.BR rulexdb_retrieve_item (3),
98
.BR rulexdb_search (3),
99
.BR rulexdb_seq (3),
100
.BR rulexdb_subscribe_rule (3)
101
.SH AUTHOR
102
Igor B. Poretsky <poretsky@mlbox.ru>.
103

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

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

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

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