Closed Gaia-Wu closed 8 months ago
貌似是因为我使用的本地模型路径没有生效? 运行的时候却出现: 提问: 模型路径一定需要放在‘~/.pycorrector/datasets/’下才可以嘛?
源码里面应该可以追踪到路径配置信息
貌似是因为我使用的本地模型路径没有生效? 运行的时候却出现: 提问: 模型路径一定需要放在‘~/.pycorrector/datasets/’下才可以嘛?
代码里看是的
USER_DATA_DIR = os.path.expanduser('~/.pycorrector/datasets/') os.makedirs(USER_DATA_DIR, exist_ok=True) language_model_path = os.path.join(USER_DATA_DIR, 'zh_giga.no_cna_cmn.prune01244.klm')
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.(由于长期不活动,机器人自动关闭此问题,如果需要欢迎提问)
updated. 可以用
import os
os.environ["PYCORRECTOR_DATA_DIR"] = "/your_new_path/"
改变默认的模型路径 ~/.pycorrector/datasets/
为 /your_new_path/
在此之前是可以成功运行的 我重新下载了文件还是不行 请问有解决办法吗