0
我想根據http://nlp.stanford.edu/downloads/corenlp.shtml中的說明在斯坦福大學CoreNLP中添加一個新的註釋器。在斯坦福大學CoreNLP中添加一個新的註釋器
「添加新的註釋器 StanfordCoreNLP
還具有通過反射,而不會改變在StanfordCoreNLP.java
代碼添加一個新的註釋的能力。爲了創建一個新的註釋,延伸類edu.stanford.nlp.pipeline.Annotator並定義一個然後,將屬性customAnnotatorClass。FOO=BAR
添加到用於創建管道的屬性中。如果將FOO添加到註釋器列表中,則會創建BAR類,其名稱將用於創建它並傳遞屬性文件「。
我爲我的新註釋器創建了一個新類,但是我無法將要通過的屬性文件。 我只將新的註釋器放入管道中。
props.put("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref, regexner, color");
props.setProperty("customAnnotatorClass.color", "myPackage.myPipeline");
有沒有任何示例代碼可以幫助我?
你是如何創建你的註釋器? – Tariq
您能否詳細介紹爲斯坦福大學CoreNLP創建自定義註釋器的過程/步驟?謝謝 – Tariq
如果你四年前問過我,我可能會提供幫助。但我的代碼仍然在線。也許你想檢查一下:https://svn.ipd.kit.edu/trac/AliceNLP/browser/ivan/trunk/src/main/java/edu/kit/ipd/alicenlp/ivan/analyzers/StaticDynamicClassifier。 java的 –