|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--edu.stanford.nlp.dbm.AbstractDataCollection | +--edu.stanford.nlp.dbm.FileDataCollection
DataCollection in which the Data and Features are stored in a File or Directory. Subclasses must only implement fileIterator, whose next() method returns the next data item from the file.
Field Summary | |
protected DataMatrix |
datamatrix
|
protected int |
numdocs
|
Fields inherited from class edu.stanford.nlp.dbm.AbstractDataCollection |
data, features, name |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
protected |
FileDataCollection()
Creates an empty filedatacollection |
|
FileDataCollection(List db,
String filename)
|
|
FileDataCollection(String filename)
Creates a FileDataCollection given a filename. |
|
FileDataCollection(String filename,
int n)
Creates a FileDataCollection. |
Method Summary | |
int |
add(Datum d)
inserts a Datum into the Data Collection assigns Datum to lowest unassigned index in FileDataCollection and returns this index note: this allows for duplicate objects to be stored with different indices. |
Matrix |
dataMatrix()
gets the feature matrix |
List |
features()
returns an IndexedCollection of all the features |
abstract Iterator |
fileIterator()
returns an iterator over the file where the FileDataCollection is stored. |
void |
populate()
populates the FileDataCollection with information from a file |
protected void |
set(DataMatrix dm)
|
protected void |
set(int nd)
|
protected void |
set(List db)
|
protected void |
setDefaults(String filename)
Sets DataMatrix, List, Processors, to default values, where features and data are stored in memory. |
protected void |
setDefaults(String filename,
String dir)
Sets DataMatrix, List, Processors, to default values, where features and data are stored on disk in directory dir . |
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 |
Field Detail |
protected DataMatrix datamatrix
protected int numdocs
Constructor Detail |
protected FileDataCollection()
public FileDataCollection(String filename)
public FileDataCollection(List db, String filename)
public FileDataCollection(String filename, int n)
Method Detail |
protected void set(List db)
protected void set(DataMatrix dm)
protected void set(int nd)
protected void setDefaults(String filename)
protected void setDefaults(String filename, String dir) throws IOException
dir
.
IOException
public int add(Datum d)
public Matrix dataMatrix()
dataMatrix
in interface DataCollection
dataMatrix
in class AbstractDataCollection
public List features()
features
in interface DataCollection
features
in class AbstractDataCollection
public void populate()
public abstract Iterator fileIterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |