优化科室匹配,修正优先级判断

This commit is contained in:
2024-08-21 10:59:04 +08:00
parent 7fbcf7d268
commit 2ffdd5a22d
3 changed files with 10 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
x-env: x-env:
&template &template
image: fcb_photo_review:1.12.10 image: fcb_photo_review:1.12.11
restart: always restart: always
services: services:

View File

@@ -76,6 +76,7 @@ HOSPITAL_ALIAS = {
} }
DEPARTMENT_ALIAS = { DEPARTMENT_ALIAS = {
"耳鼻喉": ["耳鼻咽喉"], "耳鼻喉": ["耳鼻咽喉"],
"急症": ["急诊"],
} }
""" """
@@ -89,11 +90,13 @@ DEPARTMENT_FILTER = ["医", "病", "病区", "伤"]
""" """
分词配置 分词配置
""" """
jieba.suggest_freq(('肿瘤', '医院'), True) jieba.suggest_freq(("肿瘤", "医院"), True)
jieba.suggest_freq(('心血管', ''), True) jieba.suggest_freq(("心血管", ""), True)
jieba.suggest_freq(('', ''), True) jieba.suggest_freq(("", ""), True)
jieba.suggest_freq(('感染', ''), True) jieba.suggest_freq(("感染", ""), True)
jieba.suggest_freq(('', ''), True) jieba.suggest_freq(("", ""), True)
jieba.suggest_freq(("", ""), True)
jieba.add_word("病区", 10000)
""" """
模型配置 模型配置

View File

@@ -341,7 +341,7 @@ def discharge_task(pk_phhd, discharge_record, identity):
match_departments.append(search_department(new_department)) match_departments.append(search_department(new_department))
break break
best_match = None best_match = None
best_score = 0 best_score = -1000
for match_department in match_departments: for match_department in match_departments:
if match_department and match_department[1] > best_score: if match_department and match_department[1] > best_score:
best_match = match_department best_match = match_department