feat: 尝试加上标题

This commit is contained in:
caoqianming 2023-12-15 19:41:26 +08:00
parent adb91f0d6b
commit 8ee4ab7dd3
1 changed files with 6 additions and 1 deletions

View File

@ -361,6 +361,11 @@ def ana_wechat():
return output_data return output_data
def find_title(text):
match = re.search(r'#\s*.*', text, re.MULTILINE)
if match:
return match.group(0).strip() # 去除两边的空白字符
return "/"
def ana_web(): def ana_web():
output_data = [] output_data = []
@ -392,7 +397,7 @@ def ana_web():
output_row = [ output_row = [
index, index,
row2['name'], row2['name'],
"/", find_title(row2['text']),
row['错误表述'], row['错误表述'],
row['建议修改词语'], row['建议修改词语'],
row['错误分类'], row['错误分类'],