edu.cmu.minorthird.classify.transform
Class DictionaryTransform
java.lang.Object
edu.cmu.minorthird.classify.transform.AbstractInstanceTransform
edu.cmu.minorthird.classify.transform.DictionaryTransform
- All Implemented Interfaces:
- InstanceTransform, java.io.Serializable
public class DictionaryTransform
- extends AbstractInstanceTransform
- implements java.io.Serializable
- See Also:
- Serialized Form
Constructor Summary |
DictionaryTransform(ExampleSchema schema,
com.wcohen.ss.lookup.SoftDictionary[] softDict,
java.lang.String[] featurePattern,
com.wcohen.ss.api.StringDistance[][] dists)
|
Method Summary |
static java.lang.String |
getFeatureValue(Instance instance,
java.lang.String[] featurePattern)
If feature pattern is of the form x.y.z and there is a feature of
the form x.y.z.a, return the string "a". |
java.lang.String |
toString()
|
Instance |
transform(Instance instance)
Create a transformed copy of the instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DictionaryTransform
public DictionaryTransform(ExampleSchema schema,
com.wcohen.ss.lookup.SoftDictionary[] softDict,
java.lang.String[] featurePattern,
com.wcohen.ss.api.StringDistance[][] dists)
transform
public Instance transform(Instance instance)
- Description copied from interface:
InstanceTransform
- Create a transformed copy of the instance.
- Specified by:
transform
in interface InstanceTransform
- Specified by:
transform
in class AbstractInstanceTransform
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getFeatureValue
public static java.lang.String getFeatureValue(Instance instance,
java.lang.String[] featurePattern)
- If feature pattern is of the form x.y.z and there is a feature of
the form x.y.z.a, return the string "a".