0
我想使用斯坦福庫設置我的NLP分析器。 在網站上我下載斯坦福CoreNLP - 如何設置另一種語言
- stanford-corenlp-full-2015-12-09.zip
- 斯坦福 - 法國corenlp - 2016年1月14日 - models.jar
現在我面臨一個問題,我如何指示我的應用程序使用法語模式來分析我的句子。
其實我有這樣的代碼(英文句子工作)
String text = "I am very sad";
Properties props = new Properties();
props.setProperty("annotators", "tokenize, ssplit, pos, lemma, parse, sentiment");
StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
Annotation annotation = pipeline.process(text);
List<CoreMap> sentences = annotation.get(CoreAnnotations.SentencesAnnotation.class);
for (CoreMap sentence : sentences) {
String sentiment = sentence.get(SentimentCoreAnnotations.SentimentClass.class);
System.out.println(sentiment + "\t" + sentence);
}
有沒有一種方式,我想法國模式的代碼來表示(和嘗試解析像「卓悅,濟米的句子「appelle吉恩」。
感謝, 阿列克謝