Natural Language Processing · 免费预览
基于编码器-解码器的机器翻译
语言在语序、词汇和省略上的差异,在它们之间进行映射的交叉注意力编码器-解码器,束搜索解码,以及 chrF 评估。
1. Machine Translation with Encoder-Decoders
Machine Translation with Encoder-Decoders
2. The encoder-decoder with cross-attention
The encoder-decoder with cross-attention
3. Beam search and evaluation
Beam search and evaluation
4. Beam search and chrF in NumPy
Beam search and chrF in NumPy
5. Reading a typological map
Which set of typological statements about translation divergences is correct?
6. Where cross-attention looks
In the decoder's cross-attention layer, where do the queries, keys, and values come from?
7. Greedy versus a beam of two
A decoder's first-token probabilities are fog and mist . After fog, the next token is bank with then end with ; after mist, the next token is shoal with then end with . Compute the probability of greedy's complete output and of the beam's best output, then give the beam path's probability.
8. Dividing the score by length
Why do beam search implementations divide each hypothesis's log probability by its length before comparing finished candidates?
9. chrF with one wrong character
The reference is 'red fishing boat' and a candidate is 'red fishing boot'. With , chrF ignores spaces, averages unigram and bigram precision into chrP and recall into chrR, then computes . Compute chrP, rounding to three decimals.