|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.objectbank.ObjectBank<List<FeatureLabel>>
edu.stanford.nlp.sequences.ObjectBankWrapper
public class ObjectBankWrapper
This class is used to wrap the ObjectBank used by the sequence models and is where any sort of general processing, like the IOB mapping stuff and wordshape stuff, should go. It checks the SeqClassifierFlags to decide what to do.
TODO: We should rearchitect this so that the FeatureFactory-specific stuff is done by a callback to the relevant FeatureFactory.
Field Summary |
---|
Fields inherited from class edu.stanford.nlp.objectbank.ObjectBank |
---|
ifrf, rif |
Constructor Summary | |
---|---|
ObjectBankWrapper(SeqClassifierFlags flags,
ObjectBank<List<FeatureLabel>> wrapped,
Set<String> knownLCWords)
|
Method Summary | |
---|---|
boolean |
add(List<FeatureLabel> o)
Unsupported Operation. |
boolean |
addAll(Collection<? extends List<FeatureLabel>> c)
Unsupported Operation. |
void |
clear()
|
void |
clearMemory()
If you are keeping the contents in memory, this will clear hte memory, and they will be recomputed the next time iterator() is called. |
boolean |
contains(List<FeatureLabel> o)
|
boolean |
containsAll(Collection c)
Can be slow. |
boolean |
isEmpty()
|
Iterator<List<FeatureLabel>> |
iterator()
|
void |
keepInMemory(boolean keep)
Tells the ObjectBank to store all of its contents in memory so that it doesn't have to be recomputed each time you iterate through it. |
List<FeatureLabel> |
processDocument(List<FeatureLabel> doc)
|
boolean |
remove(List<FeatureLabel> o)
|
boolean |
removeAll(Collection c)
Unsupported Operation. |
boolean |
retainAll(Collection c)
Unsupported Operation. |
int |
size()
Can be slow. |
Object[] |
toArray()
Can be slow. |
List<FeatureLabel>[] |
toArray(List<FeatureLabel>[] o)
|
Methods inherited from class edu.stanford.nlp.objectbank.ObjectBank |
---|
contains, remove, toArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public ObjectBankWrapper(SeqClassifierFlags flags, ObjectBank<List<FeatureLabel>> wrapped, Set<String> knownLCWords)
Method Detail |
---|
public Iterator<List<FeatureLabel>> iterator()
iterator
in interface Iterable<List<FeatureLabel>>
iterator
in interface Collection<List<FeatureLabel>>
iterator
in class ObjectBank<List<FeatureLabel>>
public List<FeatureLabel> processDocument(List<FeatureLabel> doc)
public boolean add(List<FeatureLabel> o)
ObjectBank
add
in interface Collection<List<FeatureLabel>>
add
in class ObjectBank<List<FeatureLabel>>
public boolean addAll(Collection<? extends List<FeatureLabel>> c)
ObjectBank
addAll
in interface Collection<List<FeatureLabel>>
addAll
in class ObjectBank<List<FeatureLabel>>
public void clear()
clear
in interface Collection<List<FeatureLabel>>
clear
in class ObjectBank<List<FeatureLabel>>
public void clearMemory()
ObjectBank
clearMemory
in class ObjectBank<List<FeatureLabel>>
public boolean contains(List<FeatureLabel> o)
public boolean containsAll(Collection c)
ObjectBank
containsAll
in interface Collection<List<FeatureLabel>>
containsAll
in class ObjectBank<List<FeatureLabel>>
public boolean isEmpty()
isEmpty
in interface Collection<List<FeatureLabel>>
isEmpty
in class ObjectBank<List<FeatureLabel>>
public void keepInMemory(boolean keep)
ObjectBank
keepInMemory
in class ObjectBank<List<FeatureLabel>>
public boolean remove(List<FeatureLabel> o)
public boolean removeAll(Collection c)
ObjectBank
removeAll
in interface Collection<List<FeatureLabel>>
removeAll
in class ObjectBank<List<FeatureLabel>>
public boolean retainAll(Collection c)
ObjectBank
retainAll
in interface Collection<List<FeatureLabel>>
retainAll
in class ObjectBank<List<FeatureLabel>>
public int size()
ObjectBank
size
in interface Collection<List<FeatureLabel>>
size
in class ObjectBank<List<FeatureLabel>>
public Object[] toArray()
ObjectBank
toArray
in interface Collection<List<FeatureLabel>>
toArray
in class ObjectBank<List<FeatureLabel>>
public List<FeatureLabel>[] toArray(List<FeatureLabel>[] o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |