update google drive file link in json

This commit is contained in:
Jason Lee
2024-03-09 18:06:48 +08:00
parent d68e7369b7
commit 2291af394f
16 changed files with 117 additions and 60 deletions

View File

@@ -98,13 +98,16 @@ def fuzzy_place_math(result_file_path, rules) -> float:
for para in doc.paragraphs:
words_list.extend(para.text.split())
# Print out the list of extracted words
print("Your Answers: ")
print(words_list)
fuzzy_score_list = []
for word in words_list:
if not any(ans in word for ans in expect):
print("Wrong place:", word)
return 0
return 1
max_score = 0
for ans in expect:
score = fuzz.ratio(word, ans)
max_score = max(max_score, score)
fuzzy_score_list.append(max_score)
return sum(fuzzy_score_list) / len(fuzzy_score_list)
def check_csv(result: str, rules: Dict[str, List[Dict[str, str]]]) -> float:
"""