gpt4 book ai didi

JAVA:如何将 Gazettes 与 Stanford NLP 结合使用?

转载 作者:行者123 更新时间:2023-12-03 20:26:10 25 4
gpt4 key购买 nike

我读了这个faq但我不明白。我尝试使用这段代码:

   Properties pp=new Properties();  
pp.put("annotators", "tokenize, ssplit, pos, lemma, ner, parse");
pp.put("ner.useSUTime","false");

pp.put("useGazettes","true");
pp.put("gazette","C:\\gaz.txt");

StanfordCoreNLP s=new StanfordCoreNLP(pp);

This is String: "Dan 于 2008 年成为 Music Friends Association 的成员"

公报文件是:

  CLASS Music friends association 

但是“乐友会”不被NER认可。

我哪里错了?

最佳答案

那里给出了答案:

If a gazette is used, this does not guarantee that words in the gazette are always used as a member of the intended class, and it does not guarantee that words outside the gazette will not be chosen. It simply provides another feature for the CRF to train against. If the CRF has higher weights for other features, the gazette features may be overwhelmed.

因此不能保证您的短语会以任何方式被标记。替代方案是

either the regexner or the tokensregex tools included in Stanford CoreNLP

关于JAVA:如何将 Gazettes 与 Stanford NLP 结合使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24164186/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com