We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug KBeamArcEagerDependencyParser 加载模型时路径含"data"会导致异常
Code to reproduce the issue
PerceptronPOSModelPath='G:/pythonProject/wikidata_django/env/Lib/site-packages/pyhanlp/static/data/model/perceptron/pku1998/pos.bin' # 调用 parser = KBeamArcEagerDependencyParser()
Describe the current behavior 载入模型时直接将PerceptronPOSModelPath的路径从idata_django开始替换为G:/pythonProject/wikidata/model/perceptron/ctb/pos.bin
PerceptronPOSModelPath
G:/pythonProject/wikidata/model/perceptron/ctb/pos.bin
Expected behavior 从pyhanlp/static/data开始替换
pyhanlp/static/data
System information
Other info / logs
public KBeamArcEagerDependencyParser(String modelPath) throws IOException, ClassNotFoundException { this(new PerceptronLexicalAnalyzer(HanLP.Config.PerceptronCWSModelPath, HanLP.Config.PerceptronPOSModelPath.replaceFirst("data.*?.bin", "data/model/perceptron/ctb/pos.bin") ).enableCustomDictionary(false), new KBeamArcEagerParser(modelPath)); }
com.hankcs.hanlp.dependency.perceptron.parser.KBeamArcEagerDependencyParser 59行 replaceFirst导致
com.hankcs.hanlp.dependency.perceptron.parser.KBeamArcEagerDependencyParser
The text was updated successfully, but these errors were encountered:
新增 KBeamArcEagerDependencyParser(String modelPath, String cwsModelPat…
66e328d
…h, String posModelPath) fix #1585
感谢反馈,已经修复,请参考上面的commit。 如果还有问题,欢迎重开issue。
Sorry, something went wrong.
hankcs
No branches or pull requests
Describe the bug
KBeamArcEagerDependencyParser 加载模型时路径含"data"会导致异常
Code to reproduce the issue
Describe the current behavior
载入模型时直接将
PerceptronPOSModelPath
的路径从idata_django开始替换为G:/pythonProject/wikidata/model/perceptron/ctb/pos.bin
Expected behavior
从
pyhanlp/static/data
开始替换System information
Other info / logs
com.hankcs.hanlp.dependency.perceptron.parser.KBeamArcEagerDependencyParser
59行 replaceFirst导致The text was updated successfully, but these errors were encountered: