|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.ml.MachineLearningPR.Cache
protected class MachineLearningPR.Cache
Field Summary | |
---|---|
protected List |
backwardCache
Stores cached data with attribute values for instances placed before the current instance. |
protected Map |
currentAttributes
A Map with annotationTypes as keys. |
protected List |
forwardCache
Stores cached data with attribute values for instances placed after the current instance. |
Constructor Summary | |
---|---|
MachineLearningPR.Cache()
|
Method Summary | |
---|---|
String |
getAttributeValue(int instanceIndex,
Attribute attribute)
Finds the value of a specified attribute for a particular instance. |
protected String |
getValue(Attribute attribute,
int instanceIndex,
Map cache)
Finds the value for a particular attribute and returns it. |
void |
shift()
Notifies the cache that it should advance its internal structures one step forward. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List forwardCache
protected List backwardCache
protected Map currentAttributes
Constructor Detail |
---|
public MachineLearningPR.Cache()
Method Detail |
---|
public String getAttributeValue(int instanceIndex, Attribute attribute)
instanceIndex
- the index of the current instance in the annotations
List.attribute
- the attribute whose value needs to be found
public void shift()
protected String getValue(Attribute attribute, int instanceIndex, Map cache)
attribute
- the attribute whose value is requested.cache
- the Map containing the cache for the appropriate position
for the attributeinstanceIndex
- the index of the instance annotation which is
covered by the sought attribute
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |