|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.objectbank.ObjectBank<java.util.List<IN>>
edu.stanford.nlp.sequences.ObjectBankWrapper<IN>
public class ObjectBankWrapper<IN extends CoreMap>
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.stanford.nlp.objectbank.ObjectBank |
---|
ObjectBank.PathToFileFunction |
Field Summary |
---|
Fields inherited from class edu.stanford.nlp.objectbank.ObjectBank |
---|
ifrf, rif |
Constructor Summary | |
---|---|
ObjectBankWrapper(SeqClassifierFlags flags,
ObjectBank<java.util.List<IN>> wrapped,
java.util.Set<java.lang.String> knownLCWords)
|
Method Summary | |
---|---|
boolean |
add(java.util.List<IN> o)
Unsupported Operation. |
boolean |
addAll(java.util.Collection<? extends java.util.List<IN>> 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(java.util.List<IN> o)
|
boolean |
containsAll(java.util.Collection<?> c)
Can be slow. |
boolean |
isEmpty()
|
java.util.Iterator<java.util.List<IN>> |
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. |
java.util.List<IN> |
processDocument(java.util.List<IN> doc)
|
boolean |
remove(java.util.List<IN> o)
|
boolean |
removeAll(java.util.Collection<?> c)
Unsupported Operation. |
boolean |
retainAll(java.util.Collection<?> c)
Unsupported Operation. |
int |
size()
Can be slow. |
java.lang.Object[] |
toArray()
|
java.util.List<IN>[] |
toArray(java.util.List<IN>[] o)
|
Methods inherited from class edu.stanford.nlp.objectbank.ObjectBank |
---|
contains, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, getLineIterator, 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<java.util.List<IN>> wrapped, java.util.Set<java.lang.String> knownLCWords)
Method Detail |
---|
public java.util.Iterator<java.util.List<IN>> iterator()
iterator
in interface java.lang.Iterable<java.util.List<IN extends CoreMap>>
iterator
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
iterator
in class ObjectBank<java.util.List<IN extends CoreMap>>
public java.util.List<IN> processDocument(java.util.List<IN> doc)
public boolean add(java.util.List<IN> o)
ObjectBank
add
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
add
in class ObjectBank<java.util.List<IN extends CoreMap>>
public boolean addAll(java.util.Collection<? extends java.util.List<IN>> c)
ObjectBank
addAll
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
addAll
in class ObjectBank<java.util.List<IN extends CoreMap>>
public void clear()
clear
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
clear
in class ObjectBank<java.util.List<IN extends CoreMap>>
public void clearMemory()
ObjectBank
clearMemory
in class ObjectBank<java.util.List<IN extends CoreMap>>
public boolean contains(java.util.List<IN> o)
public boolean containsAll(java.util.Collection<?> c)
ObjectBank
containsAll
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
containsAll
in class ObjectBank<java.util.List<IN extends CoreMap>>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
isEmpty
in class ObjectBank<java.util.List<IN extends CoreMap>>
public void keepInMemory(boolean keep)
ObjectBank
keepInMemory
in class ObjectBank<java.util.List<IN extends CoreMap>>
keep
- Whether to keep contents in memorypublic boolean remove(java.util.List<IN> o)
public boolean removeAll(java.util.Collection<?> c)
ObjectBank
removeAll
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
removeAll
in class ObjectBank<java.util.List<IN extends CoreMap>>
public boolean retainAll(java.util.Collection<?> c)
ObjectBank
retainAll
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
retainAll
in class ObjectBank<java.util.List<IN extends CoreMap>>
public int size()
ObjectBank
size
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
size
in class ObjectBank<java.util.List<IN extends CoreMap>>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<java.util.List<IN extends CoreMap>>
toArray
in class ObjectBank<java.util.List<IN extends CoreMap>>
public java.util.List<IN>[] toArray(java.util.List<IN>[] o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |