|
MaltParser 1.7.1 | |||||||||
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)
|
void |
decrementfeatureCounter()
|
int |
decrementIndex(Long key)
|
int |
getFeatureCounter()
|
int |
getIndex(int featurePosition,
int code)
Return |
int |
getIndex(int featurePosition,
int code1,
int code2)
|
Integer |
removeIndex(long key)
|
Long[] |
reverseMap()
|
void |
setFeatureCounter(int featureCounter)
|
int |
setIndex(long key,
int index)
|
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 setIndex(long key, int index)
public int decrementIndex(Long key)
public void decrementfeatureCounter()
public Integer removeIndex(long key)
public int getIndex(int featurePosition, int code1, int code2)
public int size()
public Long[] reverseMap()
public void setFeatureCounter(int featureCounter)
public int getFeatureCounter()
|
MaltParser 1.7.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |