, 25 2017 . 08:26
+
- , : . ( , ) . , , , .
, . , . , ? .
. - , .

:
)
. :
%20%3D%20%5Cprod_%7Bi%3D1%7D%5En%20%5Cmathbf%7BP%7D(w_i%20%7C%20w_1%2C%20%5Cldots%2C%20w_%7Bi-1%7D))
.
, . , , :
, ( , ) , :
.
, , ,
.
N-
, N- .
%20%5Capprox%20%5Cmathbf%7BP%7D(w_i%20%7C%20w_%7Bi%20-%20N%7D%2C%20%5Cldots%2C%20w_%7Bi-1%7D))
, .
Counter Python . : 5- , , - .
KneserNey Katzs backing-off. N- Foundations of Statistical Natural Language Processing.
, 5- : ( , ) Google One Billion Word Benchmark for Measuring Progress in Statistical Language Modeling , , , .
. , , , ( ).
, , . RNN , , . . LSTM GRU. , , LSTM.
(embedding). ( ) , , softmax . ( ).
: . , .
torch:
. softmax noise contrastive estimation.
Sebastian Ruder.
- , , - (cross entropy) . , -
%20%3D%20-%20%5Csum_i%20y_i%20%5Clog_2%20%5Chat%20y_i)
. ,

.
-

- ,

, one-hot-encoding (.. , , ).

.
-

. :
%20%3D%20-%20%5Cfrac%201%20n%20%5Csum_k%20%5Clog_2%20%5Cmathbf%7BP%7D(w_k%20%7C%20w_1%2C%20%5Cldots%2C%20w_%7Bk-1%7D))
. , , : .
, (perplexity):
%20%3D%202%5E%7BH(w_1%2C%20%5Cldot%2C%20w_n)%7D%20%3D%202%5E%7B-%20%5Cfrac%201%20n%20%5Csum_k%20%5Clog_2%20%5Cmathbf%7BP%7D(w_k%20%7C%20w_1%2C%20%5Cldots%2C%20w_%7Bk-1%7D)%7D)
.
, , .
%20%3D%20%5Cfrac%201%20N)
, N , N. , , , .
, 100 , 100 . 100 000, , .
, . , ( ). , . , , ( , ,
).
, , , . LSTM .
. , , . : .
: many-to-many ( ) many-to-one ( ).
, :
many-to-many , .
. , , . , . , : , , .
many-to-one :
. , , , .
( keras):
, 60000 + 1 : .
. , , .
- , ( ). . , , , .
: ( , , ) . .
. , . - . , .
, . , .
, , :
: . : . , , .
, . , (, RusVectores). , , .
Universal Dependencies, , -2017.
: (Undefined). .
, , , . .
, , LSTM , , .
. . , .
. + ( , , ). .
, softmax- softmax noise contrastive estimation tensorflow. , , softmax. , .
:
. stihi.ru . ( ) .
, ( stihi.ru). , , . , , , .
, . . , .
, . , : . , .
:
, .
-
, -, . , . , . : , .
. : , . , + + + + ( ):
, , . , ( ) ( ). 2 , , .
. . ( ). , , .
, .
: , ? , (, ). .
. (beam search), N .
, , , , N , . . N- . .
. , .
. , , , .
atwice .
https://habrahabr.ru/post/334046/
:
author DanAnastasyev
python
natural language processing
nlp