|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.FeatureFactory
public class FeatureFactory
Creates Features, and maintains a mapping between Features and numeric ids. Also ensures that only a single feature instance exists with a particular name.
Nested Class Summary | |
---|---|
protected class |
FeatureFactory.CompactInstance
A compact but immutable implementation of an instance. |
Constructor Summary | |
---|---|
FeatureFactory()
|
Method Summary | |
---|---|
Example |
compress(Example example)
Return a version of the Example in which all features have been translated to canonical versions from the feature factory. |
FeatureFactory.CompactInstance |
compress(Instance instance)
Return a version of the instance in which all features have been translated to canonical versions from the feature factory |
MultiExample |
compress(MultiExample example)
Return a version of the MultiExample in which all features have been translated to canonical versions from the feature factory. |
boolean |
contains(Feature f)
|
Feature |
getFeature(Feature f)
|
Feature |
getFeature(int id)
|
Feature |
getFeature(java.lang.String fullName)
|
Feature |
getFeature(java.lang.String[] name)
|
int |
getID(Feature feature)
|
int |
getMaxFeatureIndex()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FeatureFactory()
Method Detail |
---|
public int getMaxFeatureIndex()
public boolean contains(Feature f)
public Feature getFeature(Feature f)
public Feature getFeature(java.lang.String fullName)
public Feature getFeature(java.lang.String[] name)
public Feature getFeature(int id)
public int getID(Feature feature)
public FeatureFactory.CompactInstance compress(Instance instance)
public Example compress(Example example)
public MultiExample compress(MultiExample example)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |