This commit is contained in:
Tong Gao 2023-08-23 16:25:23 +08:00 committed by GitHub
parent 1034c487ef
commit 01372a4806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,7 @@ def crowspairs_postprocess(text: str) -> str:
if re.search('Neither', text) or re.search('Both', text): if re.search('Neither', text) or re.search('Both', text):
return 'invalid' return 'invalid'
if text != '':
first_option = text[0] first_option = text[0]
if first_option.isupper() and first_option in 'AB': if first_option.isupper() and first_option in 'AB':
return first_option return first_option