edu.stanford.nlp.ling
Interface Document<T>

All Superinterfaces:
Collection<T>, Datum, Featurizable, Iterable<T>, Labeled, List<T>, Serializable
All Known Implementing Classes:
BasicDocument

public interface Document<T>
extends Datum, List<T>

Represents a text document as a list of Words with a title.

Author:
Sepandar Kamvar (sdkamvar@stanford.edu), Joseph Smarr (jsmarr@stanford.edu)

Method Summary
 Document blankDocument()
          Returns a new empty Document with the same meta-data (title, labels, etc) as this Document.
 String title()
          Returns title of document, or "" if the document has no title.
 
Methods inherited from interface edu.stanford.nlp.ling.Featurizable
asFeatures
 
Methods inherited from interface edu.stanford.nlp.ling.Labeled
label, labels
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

title

String title()
Returns title of document, or "" if the document has no title. Implementations should never return null.

Returns:
The document's title

blankDocument

Document blankDocument()
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 in document can be preserved and the out document can maintain the meta-data of the in document.

Returns:
An empty document of the right sort.


Stanford NLP Group