|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object types.Alphabet
public class Alphabet
This class is used to map from some descriptive features (e.g. words in text) to an index in an array.
Constructor Summary | |
---|---|
Alphabet()
|
Method Summary | |
---|---|
Object |
lookupIndex(int ind)
|
String |
lookupInt(int key)
returns the string representation of feature associated with a index. |
int |
lookupObject(Object feature)
returns the index associated with a feature. |
int |
size()
|
void |
startGrowth()
|
void |
stopGrowth()
at test time, we need to stop the growth of the alphabet so we do not increase the size of the feature vector in case the user tries to use features not encountered at training time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Alphabet()
Method Detail |
---|
public int lookupObject(Object feature)
feature
-
public Object lookupIndex(int ind)
public void stopGrowth()
public void startGrowth()
public int size()
public String lookupInt(int key)
index
- of feature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |