[Fix] Update common summarizer regex extraction (#1631)

This commit is contained in:
Linchen Xiao 2024-10-22 14:35:45 +08:00 committed by GitHub
parent a927bba1cf
commit be3c06a158
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ def post_process_single_rate(judgement: str):
xxx[[5]]xxx, and extract the score
"""
pattern = r'Rating:\s*\[\[([\d.]+)\]\]'
pattern = r'\[\[([\d.]+)\]\]'
matched_result = re.findall(pattern, judgement)
if matched_result:
score = float(matched_result[0])