信息抽取结果判空

This commit is contained in:
2024-10-18 14:08:13 +08:00
parent ce44a81603
commit fe58bb3bfa

View File

@@ -170,7 +170,7 @@ def information_extraction(phrec, pk_phhd):
else:
tmp_info_extract = []
if len(tmp_info_extract) > len(info_extract):
if tmp_info_extract and len(tmp_info_extract) > len(info_extract):
info_extract = tmp_info_extract
ocr_text = tmp_ocr_text
rec_type = tmp_rec_type