-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


[ ]

, 25 2017 . 08:26 +





- , : . ( , ) . , , , .

, . , . , ? .



. - , .

w_1, \ldots, w_n : \mathbf{P}(w_1, \ldots, w_n). :

\mathbf{P}(w_1, \ldots, w_n) = \prod_{i=1}^n \mathbf{P}(w_i | w_1, \ldots, w_{i-1}).

, . , , :



, ( , ) , : . , , , .

N-


, N- . \mathbf{P}(w_i | w_1, \ldots, w_{i-1}) \approx \mathbf{P}(w_i | w_{i - N}, \ldots, w_{i-1}) , .

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) . , - y \hat y H(y, \hat{y}) = - \sum_i y_i \log_2 \hat y_i. , y \hat y.
- \hat y_i i- , y , one-hot-encoding (.. , , ). H(y, \hat y) = - \log_2 \hat y_k y_k = 1.

- w_1, \ldot, w_n . : H(w_1, \ldot, w_n) = - \frac 1 n \sum_k \log_2 \mathbf{P}(w_k | w_1, \ldots, w_{k-1}). , , : .

, (perplexity):

PP(w_1, \ldot, w_n) = 2^{H(w_1, \ldot, w_n)} = 2^{- \frac 1 n \sum_k \log_2 \mathbf{P}(w_k | w_1, \ldots, w_{k-1})}.

, , . \mathbf{P}(w) = \frac 1 N, 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 .
Original source: habrahabr.ru (comments, light).

https://habrahabr.ru/post/334046/

:  

: [1] []
 

:
: 

: ( )

:

  URL