paddlenlp.layers.crf.po 7.07 KB
Newer Older
yuguo-Jack's avatar
yuguo-Jack committed
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2021, PaddleNLP
# This file is distributed under the same license as the PaddleNLP package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PaddleNLP \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-18 21:31+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.0\n"

#: ../source/paddlenlp.layers.crf.rst:2
msgid "crf"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf:1
msgid ""
"LinearChainCrf is a linear chain Conditional Random Field layer, it can "
"implement sequential dependencies in the predictions. Therefore, it can "
"take context into account whereas a classifier predicts a label for a "
"single sample without considering \"neighboring\" samples. See "
"https://repository.upenn.edu/cgi/viewcontent.cgi?article=1162&context=cis_papers"
" for reference."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf
#: paddlenlp.layers.crf.LinearChainCrf.forward
#: paddlenlp.layers.crf.LinearChainCrf.gold_score
#: paddlenlp.layers.crf.LinearChainCrfLoss
#: paddlenlp.layers.crf.LinearChainCrfLoss.forward
#: paddlenlp.layers.crf.ViterbiDecoder
#: paddlenlp.layers.crf.ViterbiDecoder.forward
msgid "参数"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf:5
msgid "The label number."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf:7
msgid "The crf layer learning rate. Defaults to ``0.1``."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf:9
msgid ""
"If set to True, the start tag and stop tag will be considered, the "
"transitions params will be a tensor with a shape of `[num_labels+2, "
"num_labels+2]`. Else, the transitions params will be a tensor with a "
"shape of `[num_labels, num_labels]`."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:1
msgid ""
"Computes the normalization in a linear-chain CRF. See "
"http://www.cs.columbia.edu/~mcollins/fb.pdf for reference."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:3
msgid ""
"F & = logZ(x) = log\\sum_y exp(score(x,y))\n"
"\n"
"score(x,y) & = \\sum_i Emit(x_i,y_i) + Trans(y_{i-1}, y_i)\n"
"\n"
"p(y_i) & = Emit(x_i,y_i), T(y_{i-1}, y_i) = Trans(y_{i-1}, y_i)"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:10
msgid "then we can get:"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:12
msgid ""
"F(1) = log\\sum_{y1} exp(p(y_1) + T([START], y1))\n"
"\n"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:15
msgid ""
"F(2) & = log\\sum_{y1}\\sum_{y2} exp(p(y_1) + T([START], y1) + p(y_2) + "
"T(y_1,y_2)) \\\\\n"
"& = log\\sum_{y2} exp(F(1) + p(y_2) + T(y_1,y_2))\n"
"\n"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:19
msgid "Further, We can get F(n) is a recursive formula with F(n-1)."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:21
#: paddlenlp.layers.crf.LinearChainCrf.gold_score:4
#: paddlenlp.layers.crf.LinearChainCrfLoss.forward:4
msgid ""
"The input predicted tensor. Its dtype is float32 and has a shape of "
"`[batch_size, sequence_length, num_tags]`."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:23
#: paddlenlp.layers.crf.LinearChainCrf.gold_score:8
#: paddlenlp.layers.crf.LinearChainCrfLoss.forward:6
msgid "The input length. Its dtype is int64 and has a shape of `[batch_size]`."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward
#: paddlenlp.layers.crf.LinearChainCrf.gold_score
#: paddlenlp.layers.crf.LinearChainCrfLoss.forward
#: paddlenlp.layers.crf.ViterbiDecoder.forward
msgid "返回"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward:26
msgid ""
"Returns the normalizers tensor `norm_score`. Its dtype is float32 and has"
" a shape of `[batch_size]`."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.forward
#: paddlenlp.layers.crf.LinearChainCrf.gold_score
#: paddlenlp.layers.crf.LinearChainCrfLoss.forward
#: paddlenlp.layers.crf.ViterbiDecoder.forward
msgid "返回类型"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.gold_score:1
msgid ""
"Computes the unnormalized score for a tag sequence. $$ score(x,y) = "
"\\sum_i Emit(x_i,y_i) + Trans(y_{i-1}, y_i) $$"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.gold_score:6
#: paddlenlp.layers.crf.LinearChainCrfLoss.forward:8
msgid ""
"The input label tensor. Its dtype is int64 and has a shape of "
"`[batch_size, sequence_length]`"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrf.gold_score:11
msgid ""
"Returns the unnormalized sequence scores tensor `unnorm_score`. Its dtype"
" is float32 and has a shape of `[batch_size]`."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrfLoss:1
msgid ""
"The negative log-likelihood for linear chain Conditional Random Field "
"(CRF)."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrfLoss:3
msgid ""
"The `LinearChainCrf` network object. Its parameter will be used to "
"calculate the loss."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrfLoss.forward:1
msgid ""
"Calculate the crf loss. Let $$ Z(x) = \\sum_{y'}exp(score(x,y')) $$, "
"means the sum of all path scores, then we have $$ loss = -logp(y|x) = "
"-log(exp(score(x,y))/Z(x)) = -score(x,y) + logZ(x) $$"
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrfLoss.forward:10
msgid ""
"Unnecessary parameter for compatibility with older versions. Defaults to "
"``None``."
msgstr ""

#: of paddlenlp.layers.crf.LinearChainCrfLoss.forward:13
msgid "The crf loss. Its dtype is float32 and has a shape of `[batch_size]`."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder:1
msgid ""
"ViterbiDecoder can decode the highest scoring sequence of tags, it should"
" only be used at test time."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder:3
msgid ""
"The transition matrix.  Its dtype is float32 and has a shape of "
"`[num_tags, num_tags]`."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder:5
msgid ""
"If set to True, the last row and the last column of transitions will be "
"considered as start tag, the penultimate row and the penultimate "
"column of transitions will be considered as stop tag. Else, all the rows "
"and columns will be considered as the real tag. Defaults to ``None``."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder.forward:1
msgid "Decode the highest scoring sequence of tags."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder.forward:3
msgid ""
"The unary emission tensor. Its dtype is float32 and has a shape of "
"`[batch_size, sequence_length, num_tags]`."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder.forward:5
msgid ""
"The input length tensor storing real length of each sequence for "
"correctness. Its dtype is int64 and has a shape of `[batch_size]`."
msgstr ""

#: of paddlenlp.layers.crf.ViterbiDecoder.forward:8
msgid ""
"Returns tuple (scores, paths). The `scores` tensor containing the score "
"for the Viterbi sequence. Its dtype is float32 and has a shape of "
"`[batch_size]`. The `paths` tensor containing the highest scoring tag "
"indices. Its dtype is int64 and has a shape of `[batch_size, "
"sequence_length]`."
msgstr ""