edu.stanford.nlp.ling.Document Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stanford-parser Show documentation
Show all versions of stanford-parser Show documentation
Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.
package edu.stanford.nlp.ling;
import java.util.List;
/**
* Represents a text document as a list of Words with a String title.
*
* @author Sepandar Kamvar ([email protected])
* @author Joseph Smarr ([email protected])
* @author Sarah Spikes ([email protected]) (Templatization - added another parameter)
*
* @param The type of the labels in the Datum
* @param The type of the features in the Datum,
* and the type stored in the List
*/
public interface Document extends Datum, List {
/**
* Returns title of document, or "" if the document has no title.
* Implementations should never return null.
*
* @return The document's title
*/
public abstract String title();
/**
* Returns a new empty Document with the same meta-data (title, labels, etc)
* as this Document. Subclasses that store extra state should provide custom
* implementations of this method. This method is primarily used by the
* processing API, so the input document can be preserved and the output
* document can maintain the meta-data of the in document.
*
* @return An empty document of the right sort.
*/
public Document blankDocument();
}