You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
555 B
15 lines
555 B
from ner_1.panjueshu.main import panjueshu |
|
import os |
|
|
|
if __name__=="__main__": |
|
test_folder="" |
|
ner_con = panjueshu() |
|
test_file_name_list=os.listdir(test_folder) |
|
for test_file_name in test_file_name_list: |
|
test_file_path=os.path.join(test_folder,test_file_name) |
|
with open(test_file_path,"r",encoding="utf-8") as f: |
|
line_list=f.readlines() |
|
for line in line_list: |
|
print("原文:{}".format(line)) |
|
ner_json_list=ner_con.predict(line) |
|
print("结果:{}".format(ner_json_list)) |