|
MaltParser 1.5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.ml.lib.FeatureMap
public class FeatureMap
The purpose of the feature map is to map MaltParser's column based features together with the symbol code from the symbol table to unique indices suitable for liblinear and libsvm. A feature column position are combined together with the symbol code in a 64-bit key (Long), where 16 bits are reserved for the position and 48 bits are reserved for the symbol code.
Constructor Summary | |
---|---|
FeatureMap()
Creates a feature map and sets the feature counter to 1 |
Method Summary | |
---|---|
int |
addIndex(int featurePosition,
int code)
Adds a mapping from a combination of the position in the column-based feature vector and the symbol code to an index value suitable for liblinear and libsvm. |
int |
addIndex(int featurePosition,
int code1,
int code2)
|
int |
getFeatureCounter()
|
int |
getIndex(int featurePosition,
int code)
Return |
int |
getIndex(int featurePosition,
int code1,
int code2)
|
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureMap()
Method Detail |
---|
public int addIndex(int featurePosition, int code)
featurePosition
- a position in the column-based feature vectorcode
- a symbol code
public int getIndex(int featurePosition, int code)
featurePosition
- the position in the column-based feature vectorcode
- the symbol code suitable for liblinear and libsvm
public int addIndex(int featurePosition, int code1, int code2)
public int getIndex(int featurePosition, int code1, int code2)
public int size()
public int getFeatureCounter()
|
MaltParser 1.5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |