use of edu.illinois.cs.cogcomp.lbjava.classify.Feature in project cogcomp-nlp by CogComp.
the class POSTaggerUnknown method cachedFeatureValue.
private Feature cachedFeatureValue(Object __example) {
Token w = (Token) __example;
String __cachedValue = w.partOfSpeech;
if (__cachedValue != null) {
return new DiscretePrimitiveStringFeature(containingPackage, name, "", __cachedValue, valueIndexOf(__cachedValue), (short) allowableValues().length);
}
Feature __result;
__result = valueOf(w, __MikheevTable.allowableTags(w));
w.partOfSpeech = __result.getStringValue();
return __result;
}
use of edu.illinois.cs.cogcomp.lbjava.classify.Feature in project cogcomp-nlp by CogComp.
the class labelOneBefore method cachedFeatureValue.
private Feature cachedFeatureValue(Object __example) {
if (__example == __exampleCache.get())
return (Feature) __cache.get();
__exampleCache.set(__example);
String __cachedValue = _discreteValue(__example);
Feature __result = new DiscretePrimitiveStringFeature(containingPackage, name, "", __cachedValue, valueIndexOf(__cachedValue), (short) allowableValues().length);
__cache.set(__result);
return __result;
}
use of edu.illinois.cs.cogcomp.lbjava.classify.Feature in project cogcomp-nlp by CogComp.
the class labelOneBeforeU method cachedFeatureValue.
private Feature cachedFeatureValue(Object __example) {
if (__example == __exampleCache.get())
return (Feature) __cache.get();
__exampleCache.set(__example);
String __cachedValue = _discreteValue(__example);
Feature __result = new DiscretePrimitiveStringFeature(containingPackage, name, "", __cachedValue, valueIndexOf(__cachedValue), (short) allowableValues().length);
__cache.set(__result);
return __result;
}
use of edu.illinois.cs.cogcomp.lbjava.classify.Feature in project cogcomp-nlp by CogComp.
the class labelOrBaselineU method cachedFeatureValue.
private Feature cachedFeatureValue(Object __example) {
if (__example == __exampleCache.get())
return (Feature) __cache.get();
__exampleCache.set(__example);
String __cachedValue = _discreteValue(__example);
Feature __result = new DiscretePrimitiveStringFeature(containingPackage, name, "", __cachedValue, valueIndexOf(__cachedValue), (short) allowableValues().length);
__cache.set(__result);
return __result;
}
use of edu.illinois.cs.cogcomp.lbjava.classify.Feature in project cogcomp-nlp by CogComp.
the class labelTwoBefore method cachedFeatureValue.
private Feature cachedFeatureValue(Object __example) {
if (__example == __exampleCache.get())
return (Feature) __cache.get();
__exampleCache.set(__example);
String __cachedValue = _discreteValue(__example);
Feature __result = new DiscretePrimitiveStringFeature(containingPackage, name, "", __cachedValue, valueIndexOf(__cachedValue), (short) allowableValues().length);
__cache.set(__result);
return __result;
}
Aggregations