cxumol commited on
Commit
ed1e15b
1 Parent(s): be9a65e

fix(cxumol): correct 5-1 checker, closing #10 (#11)

Browse files

* correct 5-1 checker

* improve 5-1 logic

* Update checker 5-1

Files changed (1) hide show
  1. llmriddles/questions/level5.py +5 -1
llmriddles/questions/level5.py CHANGED
@@ -47,7 +47,11 @@ def _checker_1(question_text: str, user_text: str, answer_text: str, lang: str):
47
  if count_words(user_text) < 10:
48
  return False, "用户的问题长度应该至少10个字" if lang == 'cn' else 'Question should be no less than 10 words.'
49
 
50
- if answer_text == user_text:
 
 
 
 
51
  return True, None
52
  else:
53
  return False, None
 
47
  if count_words(user_text) < 10:
48
  return False, "用户的问题长度应该至少10个字" if lang == 'cn' else 'Question should be no less than 10 words.'
49
 
50
+ if lang == 'en':
51
+ answer_text = answer_text.split()
52
+ user_text = user_text.split()
53
+
54
+ if not any(each in answer_text for each in user_text):
55
  return True, None
56
  else:
57
  return False, None