edu.stanford.nlp.dbm
Class SentenceDocument
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
edu.stanford.nlp.dbm.SentenceDocument
- All Implemented Interfaces:
- Cloneable, Collection, Datum, Document, Featurizable, Labeled, List, RandomAccess, Serializable
- public class SentenceDocument
- extends ArrayList
- implements Document
Basically, this is a list of Sentences.
- See Also:
- Serialized Form
Field Summary |
protected String |
title
title of this document (never null). |
Method Summary |
Collection |
asFeatures()
Returns this (the features are the list of words). |
Document |
blankDocument()
Returns a new empty Document with the same meta-data (title, labels, etc)
as this Document. |
Object |
label()
Returns the primary label for this Object, or null if none have been set. |
Collection |
labels()
Returns the complete list of labels for this Object, which may be empty. |
void |
setTitle(String title)
|
String |
title()
Returns title of document, or "" if the document has no title. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
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 |
title
protected String title
- title of this document (never null).
SentenceDocument
public SentenceDocument()
label
public Object label()
- Description copied from interface:
Labeled
- Returns the primary label for this Object, or null if none have been set.
- Specified by:
label
in interface Labeled
labels
public Collection labels()
- Description copied from interface:
Labeled
- Returns the complete list of labels for this Object, which may be empty.
- Specified by:
labels
in interface Labeled
asFeatures
public Collection asFeatures()
- Returns this (the features are the list of words).
- Specified by:
asFeatures
in interface Featurizable
title
public String title()
- Description copied from interface:
Document
- Returns title of document, or "" if the document has no title.
Implementations should never return null.
- Specified by:
title
in interface Document
setTitle
public void setTitle(String title)
blankDocument
public Document blankDocument()
- Description copied from interface:
Document
- 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.
- Specified by:
blankDocument
in interface Document
Stanford NLP Group