edu.stanford.nlp.time.TimeAnnotations 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.time;
import java.util.List;
import edu.stanford.nlp.ling.CoreAnnotation;
import edu.stanford.nlp.ling.CoreAnnotations;
import edu.stanford.nlp.util.CoreMap;
import edu.stanford.nlp.util.ErasureUtils;
/**
* Set of common annotations for {@link edu.stanford.nlp.util.CoreMap}s
* that require classes from the time package. See
* {@link CoreAnnotations} for more information. This class exists
* so that {@link CoreAnnotations} need not depend on timex classes,
* which in particular pull in the xom.jar package.
*
* @author John Bauer
*
*/
public class TimeAnnotations {
/**
* The CoreMap key for storing a Timex annotation
*/
public static class TimexAnnotation implements CoreAnnotation {
public Class getType() {
return Timex.class;
}
}
/**
* The CoreMap key for storing all Timex annotations in a document.
*/
public static class TimexAnnotations implements CoreAnnotation> {
public Class> getType() {
return ErasureUtils.>> uncheckedCast(List.class);
}
}
}