Fix inequalities in answer spans for QA chapter#26
Merged
Conversation
Contributor
|
I don't understand the change. |
Member
Author
|
Isn't the definition of the "answer lies fully in the context" actually what we have in the question-answering script: Here we check that the:
If that's correct, then the negation would be: as I currently have in the PR. |
sgugger
approved these changes
Mar 21, 2022
sgugger
left a comment
Contributor
There was a problem hiding this comment.
Ah, I misunderstood what those variables meant, sorry! Thanks for fixing!
lewtun
added a commit
that referenced
this pull request
Mar 21, 2022
Fix inequalities in answer spans for QA chapter
lewtun
added a commit
that referenced
this pull request
May 10, 2023
* Add note about `remove_unused_columns` for whole word masking * Merge pull request #24 from huggingface/fix-typo Fix typo * Merge pull request #26 from huggingface/fix-qa-offsets Fix inequalities in answer spans for QA chapter * Merge pull request #30 from huggingface/fix-modelcard-url Update model card URL * Merge pull request #69 from yulonglin/patch-1 Correct typo mixing up space and newline symbols * Bump release (#99) * Bump release * Update author list Co-authored-by: DOOHAE JUNG <[email protected]> Co-authored-by: m_khandaker <[email protected]> Co-authored-by: Md. Al-Amin Khandaker <[email protected]> Co-authored-by: ftarlaci <[email protected]> Co-authored-by: Doohae Jung <[email protected]> Co-authored-by: melaniedrevet <[email protected]> * Bump release (#115) * ko-chapter1/1 * ko _toctree.yml created * Fix the issue #80 * Single expression changed * ko/chapter1 finished * ko/chapter0 finished * ko/chapter0 finished * reviewed by @bzantium ko/chapter0 * reviewed by @bzantium chapter0 & fixed typo * reviewed by @rainmaker712 * maximize Korean expressions * [Chapter 1] bangla traslation initial commit * Update 1.mdx update and fix formating * Fix formating and typos * translate _toctree.yml 0-1 chapter * Add Korean to CI * [tr] Translated chapter1/2.mdx * remove translation from sec titles not yet translated * Add authors [th ru] * [FIX] _toctree.yml * Update chapters/bn/chapter0/1.mdx [FIX] syntax formatting Co-authored-by: lewtun <[email protected]> * tag typos & indentation & unnatural expressions * modified toctree.yml for chapter1/2 * modified toctree.yml for chapter1/2 & fix typo * French Translation - Chapter 5 * Add Bengali to CI * Update author list * Adding translations for 2/4 and 2/5 🚀 (#74) * Adding translations for 2/4 and 2/5 🚀 * Remove English content Co-authored-by: lewtun <[email protected]> * Translation to Russian (#97) * translation of chapter 2/section 1 * add section 1 / chapter 2 to _toctree.yml * Translation of Chapter0 to Hindi (#86) * Hindi?Chapter0-Part_1 * Hindi/Chapter0-Part_2 * Chapter 0 Persian Translation First Draft (#95) * merged branch0 into main. no toctree yet. * updated toctree. * Updated the glossary with terms from chapter0. * Second draft in collab w/ @schoobani. Added empty chapter1 for preview. * Glossary typo fix. * Translation of Chapter0 (setup) to Arabic (#104) * Add AR translation for `introduction` * Fix alignment & format * Add Arabic to CI build * Russian - Chapter 1 finished (#98) * 01/4 start * 1/4 finished * 1/5 finished * 1/5 update toc * 1/6 finished * 1/7 finished * 1/8 finished * 1/9 finished * 1/4 fix * toc update * Chinese - Chapter 1 finished (#113) * Chinese - Chapter 1 finished * Add zh to the languages field Co-authored-by: petrichor1122 <[email protected]> Co-authored-by: zhlhyx <[email protected]> * [PT] Translation of chapter 2 (#107) * add PT translate to 2.1 * add PT translate to 2.2 * add portuguese translation to 2.3 * WIP portuguese translation to 2.4 * add portuguese translation to 2.4 * add portuguese translation to 2.5 * add portuguese translation to 2.6 * add _toctree infos Co-authored-by: lewtun <[email protected]> * [FR] Translation of chapter 2 & event + Review of chapters 0 & 5 (#106) * Update _toctree.yml Add chapter 2 + little fix of chapter 5 * Update 1.mdx Review of chapter 0 * Create 1.mdx * Create 2.mdx * Create 3.mdx * Create 4.mdx * Create 5.mdx * Create 6.mdx * Create 7.mdx * Create 8.mdx * Update 8.mdx Since AutoNLP has recently been renamed to AutoTrain, let me make the correction on the English file * Update 1.mdx Review of chapter 5/1 * Update 2.mdx Review of chapter 5/2 * Update 3.mdx Review of chapter 5/3 * Update 4.mdx Review of chapter 5/4 * Update 5.mdx Review of chapter 5/5 * Update 6.mdx Review of chapter 5/6 * Update 7.mdx Review of chapter 5/7 * Update 8.mdx Review of chapter 5/8 * Create 1.mdx event's translation * Update _toctree.yml add event to the tree * Update _toctree.yml deletion of the files that pose a problem to pass the checks, will be resubmitted in another PR * Delete 1.mdx deletion of the files that pose a problem to pass the checks, will be resubmitted in another PR * make style correction * Update _toctree.yml the - * Fix spacing Co-authored-by: Lewis Tunstall <[email protected]> * [th] Translated Chapter2/1 (#83) * Finish chapter2/1 * Update _toctree.yml * ko-chapter1/1 * ko _toctree.yml created * Fix the issue #80 * Single expression changed * ko/chapter1 finished * ko/chapter0 finished * ko/chapter0 finished * reviewed by @bzantium ko/chapter0 * reviewed by @bzantium chapter0 & fixed typo * reviewed by @rainmaker712 * maximize Korean expressions * [Chapter 1] bangla traslation initial commit * Update 1.mdx update and fix formating * Fix formating and typos * translate _toctree.yml 0-1 chapter * Add Korean to CI * remove translation from sec titles not yet translated * Add authors [th ru] * [FIX] _toctree.yml * Update chapters/bn/chapter0/1.mdx [FIX] syntax formatting Co-authored-by: lewtun <[email protected]> * tag typos & indentation & unnatural expressions * modified toctree.yml for chapter1/2 * modified toctree.yml for chapter1/2 & fix typo * Add Bengali to CI * Update author list * Adding translations for 2/4 and 2/5 🚀 (#74) * Adding translations for 2/4 and 2/5 🚀 * Remove English content Co-authored-by: lewtun <[email protected]> * Translation to Russian (#97) * translation of chapter 2/section 1 * add section 1 / chapter 2 to _toctree.yml * Translation of Chapter0 to Hindi (#86) * Hindi?Chapter0-Part_1 * Hindi/Chapter0-Part_2 * Chapter 0 Persian Translation First Draft (#95) * merged branch0 into main. no toctree yet. * updated toctree. * Updated the glossary with terms from chapter0. * Second draft in collab w/ @schoobani. Added empty chapter1 for preview. * Glossary typo fix. * Translation of Chapter0 (setup) to Arabic (#104) * Add AR translation for `introduction` * Fix alignment & format * Add Arabic to CI build * Russian - Chapter 1 finished (#98) * 01/4 start * 1/4 finished * 1/5 finished * 1/5 update toc * 1/6 finished * 1/7 finished * 1/8 finished * 1/9 finished * 1/4 fix * toc update * Chinese - Chapter 1 finished (#113) * Chinese - Chapter 1 finished * Add zh to the languages field Co-authored-by: petrichor1122 <[email protected]> Co-authored-by: zhlhyx <[email protected]> * [PT] Translation of chapter 2 (#107) * add PT translate to 2.1 * add PT translate to 2.2 * add portuguese translation to 2.3 * WIP portuguese translation to 2.4 * add portuguese translation to 2.4 * add portuguese translation to 2.5 * add portuguese translation to 2.6 * add _toctree infos Co-authored-by: lewtun <[email protected]> * [FR] Translation of chapter 2 & event + Review of chapters 0 & 5 (#106) * Update _toctree.yml Add chapter 2 + little fix of chapter 5 * Update 1.mdx Review of chapter 0 * Create 1.mdx * Create 2.mdx * Create 3.mdx * Create 4.mdx * Create 5.mdx * Create 6.mdx * Create 7.mdx * Create 8.mdx * Update 8.mdx Since AutoNLP has recently been renamed to AutoTrain, let me make the correction on the English file * Update 1.mdx Review of chapter 5/1 * Update 2.mdx Review of chapter 5/2 * Update 3.mdx Review of chapter 5/3 * Update 4.mdx Review of chapter 5/4 * Update 5.mdx Review of chapter 5/5 * Update 6.mdx Review of chapter 5/6 * Update 7.mdx Review of chapter 5/7 * Update 8.mdx Review of chapter 5/8 * Create 1.mdx event's translation * Update _toctree.yml add event to the tree * Update _toctree.yml deletion of the files that pose a problem to pass the checks, will be resubmitted in another PR * Delete 1.mdx deletion of the files that pose a problem to pass the checks, will be resubmitted in another PR * make style correction * Update _toctree.yml the - * Fix spacing Co-authored-by: Lewis Tunstall <[email protected]> * [th] Translated Chapter2/1 (#83) * Finish chapter2/1 * Update _toctree.yml * Add Hindi to CI (#116) Co-authored-by: DOOHAE JUNG <[email protected]> Co-authored-by: m_khandaker <[email protected]> Co-authored-by: Md. Al-Amin Khandaker <[email protected]> Co-authored-by: ftarlaci <[email protected]> Co-authored-by: Doohae Jung <[email protected]> Co-authored-by: melaniedrevet <[email protected]> Co-authored-by: Jose M Munoz <[email protected]> Co-authored-by: svv73 <[email protected]> Co-authored-by: Vedant Pandya <[email protected]> Co-authored-by: Bahram Shamshiri <[email protected]> Co-authored-by: Giyaseddin Bayrak <[email protected]> Co-authored-by: Pavel <[email protected]> Co-authored-by: 1375626371 <[email protected]> Co-authored-by: petrichor1122 <[email protected]> Co-authored-by: zhlhyx <[email protected]> Co-authored-by: João Gustavo A. Amorim <[email protected]> Co-authored-by: lbourdois <[email protected]> Co-authored-by: Cherdsak Kingkan <[email protected]> * Bump release 4 (#133) * Bump release (#138) * ko-chapter1/1 * ko _toctree.yml created * Fix the issue #80 * Single expression changed * ko/chapter1 finished * ko/chapter0 finished * ko/chapter0 finished * reviewed by @bzantium ko/chapter0 * reviewed by @bzantium chapter0 & fixed typo * reviewed by @rainmaker712 * maximize Korean expressions * [Chapter 1] bangla traslation initial commit * Update 1.mdx update and fix formating * Fix formating and typos * translate _toctree.yml 0-1 chapter * Add Korean to CI * [tr] Translated chapter1/2.mdx * remove translation from sec titles not yet translated * Add authors [th ru] * [FIX] _toctree.yml * Update chapters/bn/chapter0/1.mdx [FIX] syntax formatting Co-authored-by: lewtun <[email protected]> * tag typos & indentation & unnatural expressions * modified toctree.yml for chapter1/2 * modified toctree.yml for chapter1/2 & fix typo * French Translation - Chapter 5 * Add Bengali to CI * Update author list * Adding translations for 2/4 and 2/5 🚀 (#74) * Adding translations for 2/4 and 2/5 🚀 * Remove English content Co-authored-by: lewtun <[email protected]> * Translation to Russian (#97) * translation of chapter 2/section 1 * add section 1 / chapter 2 to _toctree.yml * Translation of Chapter0 to Hindi (#86) * Hindi?Chapter0-Part_1 * Hindi/Chapter0-Part_2 * Chapter 0 Persian Translation First Draft (#95) * merged branch0 into main. no toctree yet. * updated toctree. * Updated the glossary with terms from chapter0. * Second draft in collab w/ @schoobani. Added empty chapter1 for preview. * Glossary typo fix. * Translation of Chapter0 (setup) to Arabic (#104) * Add AR translation for `introduction` * Fix alignment & format * Add Arabic to CI build * Russian - Chapter 1 finished (#98) * 01/4 start * 1/4 finished * 1/5 finished * 1/5 update toc * 1/6 finished * 1/7 finished * 1/8 finished * 1/9 finished * 1/4 fix * toc update * Chinese - Chapter 1 finished (#113) * Chinese - Chapter 1 finished * Add zh to the languages field Co-authored-by: petrichor1122 <[email protected]> Co-authored-by: zhlhyx <[email protected]> * [PT] Translation of chapter 2 (#107) * add PT translate to 2.1 * add PT translate to 2.2 * add portuguese translation to 2.3 * WIP portuguese translation to 2.4 * add portuguese translation to 2.4 * add portuguese translation to 2.5 * add portuguese translation to 2.6 * add _toctree infos Co-authored-by: lewtun <[email protected]> * [FR] Translation of chapter 2 & event + Review of chapters 0 & 5 (#106) * Update _toctree.yml Add chapter 2 + little fix of chapter 5 * Update 1.mdx Review of chapter 0 * Create 1.mdx * Create 2.mdx * Create 3.mdx * Create 4.mdx * Create 5.mdx * Create 6.mdx * Create 7.mdx * Create 8.mdx * Update 8.mdx Since AutoNLP has recently been renamed to AutoTrain, let me make the correction on the English file * Update 1.mdx Review of chapter 5/1 * Update 2.mdx Review of chapter 5/2 * Update 3.mdx Review of chapter 5/3 * Update 4.mdx Review of chapter 5/4 * Update 5.mdx Review of chapter 5/5 * Update 6.mdx Review of chapter 5/6 * Update 7.mdx Review of chapter 5/7 * Update 8.mdx Review of chapter 5/8 * Create 1.mdx event's translation * Update _toctree.yml add event to the tree * Update _toctree.yml deletion of the files that pose a problem to pass the checks, will be resubmitted in another PR * Delete 1.mdx deletion of the files that pose a problem to pass the checks, will be resubmitted in another PR * make style correction * Update _toctree.yml the - * Fix spacing Co-authored-by: Lewis Tunstall <[email protected]> * [th] Translated Chapter2/1 (#83) * Finish chapter2/1 * Update _toctree.yml * Add Hindi to CI (#116) * Update README.md (#87) * Update authors on README (#120) * Update authors * French translation `Chapter1` full (#56) * traduction 1st part of chapter1 * fix typo * fix job titles and encoder-decoder translation * add part 2 for 1st chapter * fix some typo part2 * fix Transformer -> Transformers * add part 3 not totally ended * end of part3 of chapter1 * part9 chapter 1 * add part7 chapter 1 * add part5 chapter 1 * part 6 chapter 1 * add part8 chapter 1 * end quizz of chapter * add last part of chapter 1 Co-authored-by: ChainYo <[email protected]> * Translate to Japanese Chapter0 (#123) * start working * translate chapter0/1.mdx * [FA] First draft of Chapter2/Page2 (#129) * merged branch0 into main. no toctree yet. * updated toctree. * Updated the glossary with terms from chapter0. * Second draft in collab w/ @schoobani. Added empty chapter1 for preview. * Glossary typo fix. * Added missing backticks. * Removed a couple of bad indefinite articles I forgot. * First draft of ch2/p2. Adds to glossary. Trans. guidelines moved out. * Fixed missing diacritics, fixed the py/tf switch placing. Other fixes. * Changed the equivalent for prediction per @kambizG 's direction. * Redid ambiguous passage in translation per @lewtun 's direction. * [th] Finished whole Chapter 2 translation (#127) * Finish chapter2/1 * delete untranslated files * chapter2/2 WIP * Delete WIP files * WIP chapter2/2 * Fixed conflict * Update _toctree.yml * Update _toctree.yml * Finished Chapter2/2 * Finish all chapter2/n * Finish all chapter2/n * Fixed Ch2/8 as PR run failed * [de] Translation Chapter 0 (#130) * Copy files to newly created german dir (de) * Add translation for chapter 0 * Clean up english files for chapter 1 * Change _toctree.yml for chapter 0 * Fix whitespaces * Fix whitespaces again * Adjust _toctree.yml - leave only chaper 0 * Add German language (de) to workflow yaml files * [de] German Translation Guide (#132) * German Translation Guide * Add German Glossary to TOC * Chapter 1, Section 1 Bengali translation (#124) * [ADD] Chapter 1, Section 1 benglai tranlation * [FIX] toc * [FIX] commit mistakes * [FIX] remove the Eng duplicates Co-authored-by: m_khandaker <[email protected]> * [FR] Review of chapters 0, 2 & 5 + add chapters 6, 7, 8 & event (#125) * Create 1.mdx Event translation * Create 1.mdx * Chapter 6 in French * Update 1.mdx fix italic * Update 9.mdx fix italic * Update 3.mdx fix italic * Update 4.mdx fix italic * Update 4.mdx * Update 1.mdx little fix * Update 2.mdx little fix * Update 4.mdx fix italic * Update 8.mdx fix italic * Update 1.mdx little fix * Update 2.mdx little fix * Update 3.mdx little fix * Update 5.mdx little fix * Update 7.mdx little fix * Update 8.mdx little fix * add chapter8 * Update 6.mdx fix italic * Update 3.mdx fix, fix everywhere * Update 2.mdx fix, fix everywhere * Update 4.mdx fix, fix everywhere * Update 4_tf.mdx fix, fix everywhere * Add files via upload add chapter 7 * Update 1.mdx fix links * Update 2.mdx fix, fix everywhere * Update 3.mdx fix, fix everywhere * Update 4.mdx fix, fix everywhere * Update 5.mdx * Update 6.mdx fix, fix everywhere * Update 7.mdx fix, fix everywhere * Update 3.mdx fix link * Update 8.mdx fix link * Update 2.mdx fix link * Update 4.mdx little fix * Update 6.mdx * Update 7.mdx * Update 8.mdx fix * Update 2.mdx little fix * Update 3.mdx little fix * Update 5.mdx * Update 4_tf.mdx little fix * Update _toctree.yml Forgot the toctree * Update _toctree.yml fix local fields * Update _toctree.yml My bad, I forgot some 🙃 * Update 7.mdx I don't know why it was there... * Update 1.mdx * [de] Chapter 3 translation (#128) * chapter 3 part 1 DE * [DE] Chapter 3 - Part 2 * Prepare TOC-Tree * Fein-tuning * Initial translation * Glossary additions for C3P3 * C3P2 style * [de] Chapter 3 P3-TF initial translation * [de] Chapter 3 P4 initial translation * [de] Chapter 3 Part 5 initial translation * [de] Chapter 3 P6 Initial translation * Missing commas * fixing quotes * Mark third option on chapter 8, question 8 as correct (#135) * doc_change(translation): translating course from english to gujarati (#126) * change(translation): chapter0 to gujarati content translated: Chapter0/1.mdx - Introduction commit-by: [email protected] * Revert "change(translation): chapter0 to gujarati" This reverts commit c27e069. * doc_change(translation): translation to gj translated content: chapters/gj/chapter0.mdx - introduction * doc_change(translation): translation to gj translated content: chapters/gj/chapter0.mdx - introduction * Delete _toctree.yml * change: adding gj to github workflow * nit: fix heading * Update authors (#136) * [FA] First draft of Chapter4/Page1 (#134) * added chapter4 title and it's first section * added first draft of Chapter4/Page1 * minor fix * updated the title according to convention * applied some updates according to convention * added footnotes, minor improvements * applied tweaks according to review points * the new draft of glossary according to PR #134 * fixed an inconsistant title * minor fix for better compatibility with T points * applied final touches for this round of G updates * [FR] End of chapter 3 + chapter 4 (#137) * add chapters 3 & 4 * Update 2.mdx fix links * Update 3.mdx some fix * Update 6.mdx fix tag * Update 3.mdx add link to chapter 7 * Update 3_tf.mdx add link to chapter 7 * Update _toctree.yml Co-authored-by: DOOHAE JUNG <[email protected]> Co-authored-by: m_khandaker <[email protected]> Co-authored-by: Md. Al-Amin Khandaker <[email protected]> Co-authored-by: ftarlaci <[email protected]> Co-authored-by: Doohae Jung <[email protected]> Co-authored-by: melaniedrevet <[email protected]> Co-authored-by: Jose M Munoz <[email protected]> Co-authored-by: svv73 <[email protected]> Co-authored-by: Vedant Pandya <[email protected]> Co-authored-by: Bahram Shamshiri <[email protected]> Co-authored-by: Giyaseddin Bayrak <[email protected]> Co-authored-by: Pavel <[email protected]> Co-authored-by: 1375626371 <[email protected]> Co-authored-by: petrichor1122 <[email protected]> Co-authored-by: zhlhyx <[email protected]> Co-authored-by: João Gustavo A. Amorim <[email protected]> Co-authored-by: lbourdois <[email protected]> Co-authored-by: Cherdsak Kingkan <[email protected]> Co-authored-by: Thomas Chaigneau <[email protected]> Co-authored-by: ChainYo <[email protected]> Co-authored-by: hiromu <[email protected]> Co-authored-by: Cherdsak Kingkan <[email protected]> Co-authored-by: Marcus Fraaß <[email protected]> Co-authored-by: Jesper Dramsch <[email protected]> Co-authored-by: amyeroberts <[email protected]> Co-authored-by: Ash <[email protected]> Co-authored-by: Hamed Homaei Rad <[email protected]> * Bump release (#147) * Bump release (#161) * Fix typos in chapter 9 (#176) (#180) Co-authored-by: regisss <[email protected]> * Bump release (#187) * Chapter 2 Section 1 Bengali Translation (#72) (#168) * [TH] Chapter 6 Section 1 and 2 (#171) Co-authored-by: Suteera <[email protected]> * [FA] CH1 / P1-2 (#142) * Spanish Chapter 3: sections 1 & 2 (#162) * fix typos in bpe, wordpiece, unigram (#166) * [FR] French Review (#186) * Part 7: Training a causal... fixes (#179) * typo & error mitigation * consistency * Trainer.predict() returns 3 fields * ran make style * [TR] Translated Chapter 1.6 🤗 (#185) * added chapter 1/6 to _toctree.yml * [TR] Translated Chapter 1.6 🤗 Co-authored-by: Avishek Das <[email protected]> Co-authored-by: Suteera Seeha <[email protected]> Co-authored-by: Suteera <[email protected]> Co-authored-by: Saeed Choobani <[email protected]> Co-authored-by: Fermin Ordaz <[email protected]> Co-authored-by: Kerem Turgutlu <[email protected]> Co-authored-by: lbourdois <[email protected]> Co-authored-by: Sebastian Sosa <[email protected]> Co-authored-by: tanersekmen <[email protected]> * Bump release 10 (#194) * Bump release (#195) * Bump release 12 (#209) * Bump release (#224) * Bump release (#229) * Bump release (#236) * Bump release (#258) * Bump release (#270) * Bump release (#274) * Bump release (#286) * Bump release (#288) * Chapter 2 Section 1 Bengali Translation (#72) (#168) * [TH] Chapter 6 Section 1 and 2 (#171) Co-authored-by: Suteera <[email protected]> * [FA] CH1 / P1-2 (#142) * Spanish Chapter 3: sections 1 & 2 (#162) * fix typos in bpe, wordpiece, unigram (#166) * [FR] French Review (#186) * Part 7: Training a causal... fixes (#179) * typo & error mitigation * consistency * Trainer.predict() returns 3 fields * ran make style * [TR] Translated Chapter 1.6 🤗 (#185) * added chapter 1/6 to _toctree.yml * [TR] Translated Chapter 1.6 🤗 * [PT][Chapter 01 - 2.mdx] - issue #51 (#170) * Fix Gradio ToC (#193) * Add Gradio authors and Blocks event (#189) * Update 6.mdx (#188) Correct link to Transformer XL doc * Add translating notes and glossary to Spanish (#192) * Add translating notes and glosary to Spanish * Adding glossary to the toc * add pt 4.3 (#191) * [FR] Visual corrections (#190) * [PT] add chapter 4.4 and 4.5 (#196) * fix invite discord link (#197) * [FA] Second draft of CH2/P1-2 (#139) * added chapter3 in hindi (#198) * [TR] Chapter 3/1 (#165) * [RU] Ch3-1/2/3 (#200) * [PT] add 5.1 and 5.2 (#204) * [FA] - Ch3 - P1 and P2 (#199) * [PT] add `end-of-chapter quiz` for chapter 4 (4.6) (#201) Co-authored-by: lewtun <[email protected]> * Chapter1: 2.mdx Translated. (#206) * Remove comments from Persian ToC (#210) * Fix CI URL for PRs (#211) * code fragment & english syntax and meaning (#203) * Updated Ch1/1 with Emoji (#214) * Add missing numpy import (#217) * [ES] translate sections 8.1 and 8.2 (#215) * Fix path to datasets (#216) * [PT] add 5.3 (#218) * fix 4.3 (#223) * Fix notebook generation (#227) * Add Gradio nb links * add 5.4 (#226) * add pt wip (#225) * Added Gujarati List. (#221) * Add Gradio nbs links to fr (#228) * Chinese - Chapter 3finished (#219) * add ch7 at _toctree and translate 7.1 (#222) * add 5.5 (#235) * [FR] Review of chapter 7 (#233) * Italian translation - chapter 4 (#230) * Added Thai translation of chapters 3 (#231) * [Ru] Add part 2, chapter 2 (#234) * Update 8.mdx (#237) - Remove Gradio Blocks Party - Add, Where to next? section * Created HI/Chapter1/5.mdx (#232) * Add Spanish chaper3/section4, update toc and glossary (#238) * [RU] Chapter 3 finished (#239) * [PT] add 5.6 and 5.7 (#240) * [EN] Visual corrections (#245) * Translation for 1/4, 1/5 and 1/6. (#247) * add event in PT (#250) * Pin version of black (#252) * Translate ja event (#241) * [PT] add quiz chapter 5 (#243) * Update 5.mdx (#253) inconsistent naming with line 327 * Translation for Traditional Chinese (zh-tw) chapter0 (#251) Co-authored-by: Lewis Tunstall <[email protected]> * Translated the whole Chapter 3 to Thai (#255) * Japanese chapter 4 (#244) * Translation of 1/7, 1/8, and 1/9. (#263) * [PT] add chapter 8.1 and 8.2 (#265) * [RU] Chapter 4 (#269) * Add Thai translation for chapter 6.3b to 6.10 (#268) * add 8.3 (#266) * 3.mdx of chapter 01 (#260) Co-authored-by: Lewis Tunstall <[email protected]> * Fix typo (#271) * [PT] add chapter 6.1 (#273) * add Japanese chapter7 (#267) * replace `load_metric` with `evaluate.load` (#285) * update `load_metric` refs to `evaluate.load` Co-authored-by: lewtun <[email protected]> * [GJ] Translation to Gujarati - Ch0 Setup (#287) * [PT] add chapter 6.2 and 6.3 (#279) * zh-CN - Chapter 4,5finished (#281) Co-authored-by: Lewis Tunstall <[email protected]> * Chapter 01 - Done [PT] #51 (
This PR fixes a small bug reported by a course participant on the forums.
The bug concerns the inequalities used to determine whether an answer span lies within the context or not. In the original implementation, we missed cases where the answer span partially overlapped with the context (e.g. the end answer character occurs after the start context character).
With this fix, we are now consistent with the logic in the question-answering scripts (which are simply the negation of the course logic).
Asking for a review here to double-check I haven't misunderstood the original logic 😄
TODO