私は文章を持っています(テキストI):
トムは頭のいい男の子です。彼はたくさんのことを知っています。
2番目の文の彼をトムに変更したいので、最後の文は(テキストII)になります:
トムは頭のいい男の子です。トムはたくさんのことを知っています。
私はいくつかのコードを書きましたが、私のcorefオブジェクトは常にnullです。
その上、正しい結果を得るために次に何をすべきかわかりません。
String text = "Tom is a smart boy. He know a lot of thing.";
Annotation document = new Annotation(text);
Properties props = new Properties();
props.put("annotators", "tokenize, ssplit, pos, parse, lemma, ner, dcoref");
StanfordCoreNLP pipeline = new StanfordCoreNLP(props);
pipeline.annotate(document);
List<Pair<IntTuple, IntTuple>> coref = document.get(CorefGraphAnnotation.class);
私はそれが間違っているかどうか、そしてテキストIからテキストIIを取得するために次に何をすべきかを知りたいです。
PS:私はStanfordCoreNLP1.3.0を使用しています。
ありがとう。