edu.stanford.nlp.dbm
Class DataMatrix

java.lang.Object
  |
  +--edu.stanford.nlp.dbm.DataMatrix
All Implemented Interfaces:
MatrixWrapper
Direct Known Subclasses:
BOFDataMatrix, RestrictedDataMatrix

public abstract class DataMatrix
extends Object
implements MatrixWrapper

Class with methods to construct a DataMatrix (such as a term-document matrix), from the initial Objects (such as Documents).


Field Summary
protected  IndexedSet features
           
protected  GrowableMatrix matrix
           
 
Constructor Summary
DataMatrix()
           
 
Method Summary
 int add(Featurizable f)
          inserts Featurizable Object into DataMatrix, and returns its index
 List features()
           
 Matrix getMatrix()
          Returns underlying Matrix
protected  void initialize(GrowableMatrix m, IndexedSet f)
          initializes DataMatrix with Matrix m and SerialIndexed set f
protected abstract  Array insert(Collection c)
          inserts the elements in a Collection into the DataMatrix, and returns the inserted FeatureVector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matrix

protected GrowableMatrix matrix

features

protected IndexedSet features
Constructor Detail

DataMatrix

public DataMatrix()
Method Detail

initialize

protected void initialize(GrowableMatrix m,
                          IndexedSet f)
initializes DataMatrix with Matrix m and SerialIndexed set f


insert

protected abstract Array insert(Collection c)
inserts the elements in a Collection into the DataMatrix, and returns the inserted FeatureVector


add

public int add(Featurizable f)
inserts Featurizable Object into DataMatrix, and returns its index


features

public List features()

getMatrix

public Matrix getMatrix()
Description copied from interface: MatrixWrapper
Returns underlying Matrix

Specified by:
getMatrix in interface MatrixWrapper


Stanford NLP Group