Skip to content

Commit

Permalink
[Fix] Add docstring in first_independent_capital_postprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
jingmingzhuo committed Nov 20, 2023
1 parent f63e0cd commit c78a1fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opencompass/utils/text_postprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def last_option_postprocess(text: str, options: str) -> str:

@TEXT_POSTPROCESSORS.register_module()
def first_independent_capital_postprocess(text: str, options: str) -> str:
"""Find first capital with no other letters around for text."""

length = len(text)
for i in range(length):
if text[i].isupper() and text[i] in options:
Expand Down

0 comments on commit c78a1fa

Please sign in to comment.