# Errata

## Errata for Natural Language Processing with Transformers, Revised Edition

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page BLEU section in chapter 6
2nd $p_n$ equation

Safari books online, chapter 6.

In numerator of 2nd $p_n$ equation,

$\sum_{snt \in C}$ should be $\sum_{snt' \in C}$

based on the original paper.

Thanks.

Note from the Author or Editor:
Agreed, thanks for reporting!

Haesun Park  Jul 31, 2022
Page 127
footnote 3

In footnote 3, 'model_name = "gpt-xl" with model_name = "gpt"'

should be

'model_name = "gpt2-xl" with model_name = "gpt2"'

Thanks.

Note from the Author or Editor:
Yes, that's a typo. Thanks for reporting!

Haesun Park  Jul 25, 2022
Page 153
$F_{LCS}$ equation

In denominator of $F_{LCS}$ equation,

$R_{LCS} + \beta P_{LCS}$
should be
$R_{LCS} + \beta^2 P_{LCS}$

Thanks.

Note from the Author or Editor:
Indeed the exponent 2 is missing, thanks for reporting!

Haesun Park  Jul 31, 2022
Page 153
1st paragraph

In book it stated that ROUGE-L calculates the "Longest common substring" between reference and generated text. But it should be "Longest common subsequence".

Note from the Author or Editor:
That's correct, thanks for reporting!

Kirushikesh DB  Aug 14, 2022
Page 154
In <Note> box

In Note box,

"The average value is stored in the attribute mid"
should be
"The median value is stored in the attribute mid"

Thanks.

Note from the Author or Editor:
It should indeed be median, thanks for reporting!

Haesun Park  Jul 31, 2022
Page 154
1st paragraph under <note> box

It says "T5 is slightly better on ROUGE-1 and the LCS scores".
But T5's ROUGE-1 is 0.486486 and LCS is 0.378378, BART's ROUGE-1 is 0.582278 and LCS is 0.455696
So T5 is not better than BART.
Please let me know the sentence's meaning.
Thanks.

Note from the Author or Editor:
Indeed, this sentence might have referred to old values in the table. We should change the sentence to "PEGASUS is the best models overall (higher ROUGE scores are better)", but again these [...]" and "[...] to outperform T5 and at least match BART on [...]"

Haesun Park  Jul 31, 2022
Page 169
Table 7-1

In 3rd row of table 7-1,

Thanks

Note from the Author or Editor:
That's correct!

Haesun Park  Aug 03, 2022
Page 185
13th line from the top.

In 13th line from the top,

'q_review_id columns of SubjQA' should be 'id columns of SubjQA'

Thanks

Note from the Author or Editor:
Agreed, thanks for reporting!

Haesun Park  Aug 03, 2022
Page 190
5th line from the top and 12th line

In 5th line from the top and 12th line,

Shouldn't EvalRetriever be changed to EvalDocuments?

Thanks.

Note from the Author or Editor:
Agreed, thanks for reporting!

Haesun Park  Aug 03, 2022
Page 197
4th line from the bottom

In 4th line from the bottom,

Thanks.

Note from the Author or Editor:
Indeed, thanks for reporting!

Haesun Park  Aug 03, 2022
Page 205
5th line from the bottom

In 5th line from the bottom,

Shouldn't DPRetriever be changed to dpr_retriever?

Thanks

Note from the Author or Editor:
Indeed, thanks for reporting!

Haesun Park  Aug 03, 2022
Page 221
3rd line from the bottom

reduction=batchmean should be reduction="batchmean"

Thanks

Note from the Author or Editor:
Indeed, this can be fixed in the last sentence of text.

Haesun Park  Aug 10, 2022
Page 243
1st paragraph

In last sentence of 1st paragraph,

Shouldn't "three-fold gain compared to our BERT baseline" be changed to "three-fold gain compared to our DistilBERT" or "five-fold gain compared to our BERT baseline" in terms of average latency.

Thanks.

Note from the Author or Editor:
Indeed, that's correct. Thanks for reporting!

Haesun Park  Aug 10, 2022
Page 244
Last equation

In last equation,

Subscript k should be changed j to match the description above.

Thanks.

Note from the Author or Editor:
Thanks for submitting this report! The equation is correct, but I agree we can change the subscript from k to j for clarity

Haesun Park  Aug 10, 2022