Search in sources :

Example 6 with DiscretePrimitiveStringFeature

use of edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature 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;
}
Also used : DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature) Feature(edu.illinois.cs.cogcomp.lbjava.classify.Feature) DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature)

Example 7 with DiscretePrimitiveStringFeature

use of edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature 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;
}
Also used : DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature) Feature(edu.illinois.cs.cogcomp.lbjava.classify.Feature) DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature)

Example 8 with DiscretePrimitiveStringFeature

use of edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature 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;
}
Also used : DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature) Feature(edu.illinois.cs.cogcomp.lbjava.classify.Feature) DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature)

Example 9 with DiscretePrimitiveStringFeature

use of edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature 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;
}
Also used : DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature) Feature(edu.illinois.cs.cogcomp.lbjava.classify.Feature) DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature)

Example 10 with DiscretePrimitiveStringFeature

use of edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature in project cogcomp-nlp by CogComp.

the class labelTwoBeforeU 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;
}
Also used : DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature) Feature(edu.illinois.cs.cogcomp.lbjava.classify.Feature) DiscretePrimitiveStringFeature(edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature)

Aggregations

DiscretePrimitiveStringFeature (edu.illinois.cs.cogcomp.lbjava.classify.DiscretePrimitiveStringFeature)18 Feature (edu.illinois.cs.cogcomp.lbjava.classify.Feature)9 FeatureVector (edu.illinois.cs.cogcomp.lbjava.classify.FeatureVector)9 Token (edu.illinois.cs.cogcomp.lbjava.nlp.seg.Token)8