baidu / DDParser

百度开源的依存句法分析系统
Apache License 2.0
975 stars 162 forks source link

ddparser 1.0.5 只支持 ernie-lstm 模型,填入其他出错 #45

Closed SoaringTiger closed 3 years ago

SoaringTiger commented 3 years ago

例如 ddp = DDParser(encoding_model='transformer') 报错 File "/usr/local/lib/python3.8/site-packages/ddparser/parser/data_struct/utils.py", line 295, in download_model_from_url download_model_path = DOWNLOAD_MODEL_PATH_DICT[model] KeyError: 'transformer'

原因应是 DOWNLOAD_MODEL_PATH_DICT 中只有一个模型 DOWNLOAD_MODEL_PATH_DICT = { 'ernie-lstm': "https://ddparser.bj.bcebos.com/DDParser-ernie-lstm-1.0.3.tar.gz", } 而 download_model_from_url函数中并未检查 model in DOWNLOAD_MODEL_PATH_DICT download_model_path = DOWNLOAD_MODEL_PATH_DICT[model]

请问文档里提到的其它几个模型还支持吗? lstm, transformer, ernie-1.0, ernie-tiny

zhangyimi commented 3 years ago

暂时没有发布其他几个模型的计划。 ernie-lstm的速度和效果比lstm和transformer更好一些

SoaringTiger commented 3 years ago

暂时没有发布其他几个模型的计划。 ernie-lstm的速度和效果比lstm和transformer更好一些

收到。