Repository navigation
Conversation
The verbose-answer pattern stayed case-insensitive after open-compass#1751, so a standalone lowercase "a" still matched option A. Skip that article when a word follows it and let the option text fall through to can_infer_text. Co-authored-by: Meng Chen <[email protected]>
Contributor
Author
|
Hi @ssiq, friendly ping on this small follow-up to #1751 (fixes #1810): it stops answers like |
…ix-verbose-answer-article-a-9d09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1810.
Follow-up to #1740 and #1751.
#1751 added a word boundary to
_VERBOSE_ANSWER_RE, soThe answer is cat.is no longer read as C. The pattern is still case-insensitive, though, and the articleais its own word.\bdoes not reject it, soThe answer is a horse.is still parsed as option A. Oncecan_infer_optionreturns a letter,can_infer_textand the judge fallback never run. A correct answer written as option text is scored as A, and a non-answer such asThe answer is a dog.is scored as a pick of A.The change keeps the lowercase labels the current tests rely on (
Answer is **d**.,the answer is a.,answer is **a**, andThe answer is A because ...). It only skips a lowercaseawhen another word follows, which is the English article.The answer is a horse.then falls through to text matching and comes back as C;The answer is a dog.stays unresolved.Requiring an uppercase label, as #1740 suggested, does fix the article, but it breaks 24 existing subtests (for example
Answer is **d**.).tests/test_matching_option_boundaries.pycovers the four cases from the issue. On current main they fail becausecan_infer_optionreturnsA. After this change the file passes: 6 tests, including those four and the previous boundary cases.