1
A
回答
2
我們剛剛添加了一個模塊來處理這個問題。
您需要從GitHub獲取最新的代碼。
下面是一些示例代碼:
package edu.stanford.nlp.examples;
import edu.stanford.nlp.coref.*;
import edu.stanford.nlp.coref.data.*;
import edu.stanford.nlp.ling.CoreAnnotations;
import edu.stanford.nlp.util.*;
import edu.stanford.nlp.pipeline.*;
import java.util.*;
public class QuoteAttributionExample {
public static void main(String[] args) {
Annotation document =
new Annotation("John said, \"There's an elephant outside the window.\"");
Properties props = new Properties();
props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,entitymentions,quote,quoteattribution");
StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
pipeline.annotate(document);
for (CoreMap quote : document.get(CoreAnnotations.QuotationsAnnotation.class)) {
System.out.println(quote);
System.out.println(quote.get(QuoteAttributionAnnotator.MentionAnnotation.class));
}
}
}
這是仍在開發中,我們可能會添加一些代碼,使其更容易得到很快鏈接到報價的實際文本跨度。
相關問題
- 1. HTML5塊的報價與作者
- 2. 獲取文件所有者/作者
- 3. 隨機獲取作者
- 4. 獲取用戶與追隨者,並沒有關注者
- 5. 獲取報價
- 6. Instagram API獲取關注者列表
- 7. 在meteorjs中獲取用戶關注者
- 8. Ruby:Twitter API:獲取所有關注者
- 9. 不能分享鳴叫包含報價和作者(FCC隨機報價機)
- 10. 作者頁面獲取作者的帖子和頁面
- 11. TweetSharp獲得關注者數
- 12. 記錄獲取者和設置者
- 13. c中的獲取者和安裝者#
- 14. 將作者分配給當天的報價
- 15. 在雅虎使用PHP的排印工作者報價
- 16. Github API獲取特定行代碼的作者/提交者
- 17. 如何獲取PySpark中工作者(執行者)的數量?
- 18. Android開發者:避免內部獲取者/設置者?
- 19. 獲取Word文檔的作者,VBA
- 20. WordPress的 - 獲取作者圖片
- 21. 獲取gunicorn工作者的數量?
- 22. 在Wordpress中獲取發佈作者
- 23. 在CQ5獲取頁面作者
- 24. 如何做Windows phone開發者註冊(開發者解鎖)?
- 25. 獲取藝術家在Spotify上關注的關注者數量
- 26. 作者列表作者
- 27. 取回取消關注者Instagram api swift
- 28. PHP操作者| =解釋
- 29. 基於註解的DI與生產者
- 30. 作者價值不顯示時提供