edu.stanford.nlp.dbm
Class ContextSet
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--edu.stanford.nlp.dbm.AbstractDataCollection
|
+--edu.stanford.nlp.dbm.FileDataCollection
|
+--edu.stanford.nlp.dbm.DataSet
|
+--edu.stanford.nlp.dbm.ContextSet
- All Implemented Interfaces:
- Collection, DataCollection, List
- public class ContextSet
- extends DataSet
A collection of word contexts that does not allow duplicate words. If a word occurs multiple times in the datafile, the context vectors are additively combined.
Constructor Summary |
ContextSet(String filename)
Creates a ContextSet given a filename which contains a collection of Contexts. |
Method Summary |
Iterator |
fileIterator()
returns an iterator over the file where the FileDataCollection is stored. |
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
ContextSet
public ContextSet(String filename)
throws IOException
- Creates a ContextSet given a filename which contains a collection of Contexts. Stores data, features, and their respective indices in memory. Uses standard Bag-of-Features Matrix, and uses Lowercaser.
fileIterator
public Iterator fileIterator()
- Description copied from class:
FileDataCollection
- returns an iterator over the file where the FileDataCollection is stored.
- Specified by:
fileIterator
in class FileDataCollection
Stanford NLP Group