Skip to content

Commit

Permalink
Improve multilingual regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
etr2460 committed Jan 29, 2025
1 parent 250db9b commit 18eba9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
ANSWER_PATTERN_MULTICHOICE = r"(?i)Answer[ \t]*:[ \t]*([A-D])"
ANSWER_PATTERN = r"(?i)Answer\s*:\s*([^\n]+)"
MULTILINGUAL_ANSWER_PATTERN_TEMPLATE = (
"(?i){}\s*([A-D]|[أ-د]|[অ]|[ব]|[ড]|[ঢ]|[A]|[B]|[C]|[D])"
"(?i){}[ \t]*([A-D]|[أ-د]|[অ]|[ব]|[ড]|[ঢ]|[A]|[B]|[C]|[D])"
)
# All the different ways "Answer" is written in different languages
MULTILINGUAL_ANSWER_REGEXES = [
Expand All @@ -50,6 +50,7 @@
"الإجابة الصحيحة:",
"الإجابة الصحيحة هي:",
"الإجابة هي:",
"الجواب النهائي:",
"Respuesta\s*:",
"Risposta\s*:",
"答え\s*:",
Expand Down

0 comments on commit 18eba9d

Please sign in to comment.