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.


Field Summary
 
Fields inherited from class edu.stanford.nlp.dbm.FileDataCollection
datamatrix, numdocs
 
Fields inherited from class edu.stanford.nlp.dbm.AbstractDataCollection
data, features, name
 
Fields inherited from class java.util.AbstractList
modCount
 
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 edu.stanford.nlp.dbm.DataSet
add, setDefaults, setDefaults
 
Methods inherited from class edu.stanford.nlp.dbm.FileDataCollection
dataMatrix, features, populate, set, set, set
 
Methods inherited from class edu.stanford.nlp.dbm.AbstractDataCollection
get, name, size, toString, toXMLString
 
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 class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

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.

Method Detail

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