floriankark / cs224n-win2223

Code and written solutions of the assignments of the Stanford CS224N: Natural Language Processing with Deep Learning course from winter 2022/2023
http://web.stanford.edu/class/cs224n/index.html
MIT License
206 stars 61 forks source link

a4_written 2(c) / (i) in calculating BLEU for c_1, BP is wrong. #2

Closed soumitrapy closed 1 year ago

soumitrapy commented 1 year ago

Here reference sentence will be r_1. and len(r_1) = 11 hence BP should be exp(-2/9).

soumitrapy commented 1 year ago

another mistake:

2.c.i.

BLEU score for c_2: p_2 = 3/5

2.c.ii. BLEU score for c_2: p_1 = 3/6 = 1/2

floriankark commented 1 year ago

Thanks for pointing that out in 2 (c) i.

soumitrapy commented 1 year ago

2.c.i. BLEU score for c_2: here c_2 = resources be sufficient and predictable to 2-grams are: "resources be", "be sufficient", "sufficient and", "and predictable", "predictable to" Now the 2-grams "be sufficient" , "sufficient and" exists in r_1 also "and predictable" exists in r_2. hence p_2 = 3/5.

floriankark commented 1 year ago

I see, thanks for the clarification. I simply just overlooked one 2-gram!