harvardnlp / seq2seq-attn

Sequence-to-sequence model with LSTM encoder/decoders and attention
http://nlp.seas.harvard.edu/code
MIT License
1.26k stars 278 forks source link

How to compute the probability for a pair of input and output sentences? #96

Closed ayushidalmia closed 7 years ago

ayushidalmia commented 7 years ago

Hi,

I am interested in computing the probabilities for a given pair of input and output sentences. Is there a provision to do the same? Where should I look into.

Thanks

yoonkim commented 7 years ago

You can use the score from beam search. The score is essentially log p(target | source)

ayushidalmia commented 7 years ago

Yeah! Got it. Thanks!