update google drive file link in json
This commit is contained in:
@@ -17,8 +17,11 @@ def compare_conference_city_in_order( actual_city_list_path, expected_city):
|
||||
print("actual_city_list_path:")
|
||||
print(actual_city_list)
|
||||
wrong_list = []
|
||||
for i in range(len(actual_city_list)):
|
||||
if expected_city_list[i] not in actual_city_list[i]:
|
||||
wrong_list.append(i)
|
||||
print(f"Expected city {expected_city_list[i]}; Actual city {actual_city_list[i]}")
|
||||
try:
|
||||
for i in range(len(actual_city_list)):
|
||||
if expected_city_list[i] not in actual_city_list[i]:
|
||||
wrong_list.append(i)
|
||||
print(f"Expected city {expected_city_list[i]}; Actual city {actual_city_list[i]}")
|
||||
except:
|
||||
return False
|
||||
return True if len(wrong_list) == 0 else False
|
||||
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user