From 249b8eb0c9f4f344c7491059d8c6cd61fa6ff376 Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Thu, 31 Oct 2024 19:39:43 -0400 Subject: [PATCH] fix: remove negative score from prefix --- joint_teapot/utils/joj3.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py index 2301b98..d785047 100644 --- a/joint_teapot/utils/joj3.py +++ b/joint_teapot/utils/joj3.py @@ -246,7 +246,11 @@ def check_skipped(score_file_path: str, keyword: str) -> bool: def get_title_prefix(title: str) -> str: + meet_negative = False for i in range(len(title) - 1, -1, -1): if not title[i].isdigit() and not title[i].isspace(): + if not meet_negative and title[i] == "-": + meet_negative = True + continue return title[: i + 1] return ""