Errata
- 06/21/2025:
- In cell 20 in
chap09_classification.ipynbchanged this line:max_tokens = dev_df['tokens'].map(len).max()tomax_tokens = test_df['tokens'].map(len).max(). - Changed to the
evaluatelibrary for thesacrebleuevaluation metric in cell 8 inchap15_translation_en_to_ro.ipynb, cell 8 inchap15_translation_ro_to_en.ipynb, cell 9 inchap15_translation_ro_to_en_finetune.ipynb, and cell 8 inchap15_translation_ro_to_en_finetuned.ipynb. - In cell 10 in
chap15_translation_ro_to_en_finetune.ipynbchanged the parameter nameevaluation_strategytoeval_strategy. - Fixed incorrect page numbers in the Firth reference.
- In cell 20 in
- 04/05/2025:
- Corrected the implementation of
remove_diacritics()in Appendix B, which should containif not unicodedata.combining(c)rather thanif unicodedata.combining(c). - Corrected the book URL in the first paragraph of Chapter 4 to use
httpsinstead ofhttp. - Fixed the fact that the number of epochs parameter (
n_epochs) was defined but never used in several code blocks in Chapter 4.
- Corrected the implementation of
- 12/15/2024:
- Corrected equations 16.1 and 16.2.
Acknowledgements
We thank the following people for discovering these mistakes: Mike Maxwell, Minglai Yang.