fatty-belly commited on
Commit
6c59efc
·
verified ·
1 Parent(s): 718c5cc
Files changed (1) hide show
  1. utils/format_utils.py +1 -0
utils/format_utils.py CHANGED
@@ -99,6 +99,7 @@ def merge_qa_pair(vqa_jsonl, output_jsonl, strict_title_match=False):
99
  # 如果题号增加,章节标题却发生变化,说明可能错误提取了子标题。因此继续使用之前的章节标题。
100
  data["chapter_title"] = chapter_title
101
  label = data["label"]
 
102
  data["chapter_title"] = refine_title(data["chapter_title"], strict_title_match)
103
  # 动态更新,防止错误的重复label覆盖掉之前的solution或answer
104
  if data['label'] > 0:
 
99
  # 如果题号增加,章节标题却发生变化,说明可能错误提取了子标题。因此继续使用之前的章节标题。
100
  data["chapter_title"] = chapter_title
101
  label = data["label"]
102
+ data["original_chapter_title"] = data["chapter_title"]
103
  data["chapter_title"] = refine_title(data["chapter_title"], strict_title_match)
104
  # 动态更新,防止错误的重复label覆盖掉之前的solution或answer
105
  if data['label'] > 0: