edu.stanford.nlp.coref.data.InputDoc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stanford-corenlp Show documentation
Show all versions of stanford-corenlp Show documentation
Stanford CoreNLP provides a set of natural language analysis tools which can take raw English language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and word dependencies, and indicate which noun phrases refer to the same entities. It provides the foundational building blocks for higher level text understanding applications.
package edu.stanford.nlp.coref.data;
import java.util.List;
import java.util.Map;
import edu.stanford.nlp.coref.docreader.CoNLLDocumentReader.CoNLLDocument;
import edu.stanford.nlp.pipeline.Annotation;
/**
* Input document read from input source (CoNLL, ACE, MUC, or raw text)
* Stores Annotation, gold info (optional) and additional document information (optional)
*
* @author heeyoung
*
*/
public class InputDoc {
public Annotation annotation;
/**
* Additional document information possibly useful for coref.
* (e.g., is this dialog? the source of article, etc)
* We can use this as features for coref system.
* This is optional.
*/
public Map docInfo;
/**
* Gold mentions with coreference information for evaluation.
* This is optional.
*/
public List> goldMentions;
/** optional for CoNLL document */
public CoNLLDocument conllDoc;
public InputDoc(Annotation anno) {
this(anno, null, null, null);
}
public InputDoc(Annotation anno, Map docInfo) {
this(anno, docInfo, null, null);
}
public InputDoc(Annotation anno, Map docInfo, List> goldMentions) {
this(anno, docInfo, goldMentions, null);
}
public InputDoc(Annotation anno, Map docInfo, List> goldMentions, CoNLLDocument conllDoc) {
this.annotation = anno;
this.docInfo = docInfo;
this.goldMentions = goldMentions;
this.conllDoc = conllDoc;
}
}