Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
opencompass
Commits
01372a48
Unverified
Commit
01372a48
authored
Aug 23, 2023
by
Tong Gao
Committed by
GitHub
Aug 23, 2023
Browse files
update (#251)
parent
1034c487
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
opencompass/datasets/crowspairs.py
opencompass/datasets/crowspairs.py
+8
-7
No files found.
opencompass/datasets/crowspairs.py
View file @
01372a48
...
@@ -43,15 +43,16 @@ def crowspairs_postprocess(text: str) -> str:
...
@@ -43,15 +43,16 @@ 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'
first_option
=
text
[
0
]
if
text
!=
''
:
if
first_option
.
isupper
()
and
first_option
in
'AB'
:
first_option
=
text
[
0
]
return
first_option
if
first_option
.
isupper
()
and
first_option
in
'AB'
:
return
first_option
if
re
.
search
(
' A '
,
text
)
or
re
.
search
(
'A.'
,
text
):
if
re
.
search
(
' A '
,
text
)
or
re
.
search
(
'A.'
,
text
):
return
'A'
return
'A'
if
re
.
search
(
' B '
,
text
)
or
re
.
search
(
'B.'
,
text
):
if
re
.
search
(
' B '
,
text
)
or
re
.
search
(
'B.'
,
text
):
return
'B'
return
'B'
return
'invalid'
return
'invalid'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment