public final class PrefixFeature extends java.lang.Object implements FeatureMapFunction
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<?>[] |
paramTypes |
Constructor and Description |
---|
PrefixFeature(DataFormatInstance dataFormatInstance,
SymbolTableHandler tableHandler) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getCode(java.lang.String symbol)
Returns the integer representation of the string
symbol according to the feature function. |
ColumnDescription |
getColumn() |
DataFormatInstance |
getDataFormatInstance() |
FeatureValue |
getFeatureValue()
Returns the feature value
|
java.lang.String |
getMapIdentifier() |
java.lang.Class<?>[] |
getParameterTypes()
Returns an array of class types used by the feature extraction system to invoke initialize with
correct arguments.
|
FeatureFunction |
getParentFeature() |
int |
getPrefixLength() |
java.lang.String |
getSymbol(int code)
Returns the string representation of the integer
code according to the feature function. |
SymbolTable |
getSymbolTable()
Returns the symbol table used by the feature function.
|
SymbolTableHandler |
getTableHandler() |
int |
getType() |
void |
initialize(java.lang.Object[] arguments)
Initialize the feature function
|
protected void |
setColumn(ColumnDescription column) |
void |
setParentFeature(FeatureFunction feature) |
void |
setPrefixLength(int prefixLength) |
void |
setSymbolTable(SymbolTable table) |
java.lang.String |
toString() |
void |
update()
Cause the feature function to update the feature value.
|
public static final java.lang.Class<?>[] paramTypes
public PrefixFeature(DataFormatInstance dataFormatInstance, SymbolTableHandler tableHandler) throws MaltChainedException
MaltChainedException
public void initialize(java.lang.Object[] arguments) throws MaltChainedException
Function
initialize
in interface Function
arguments
- an array of arguments with the type returned by getParameterTypes()MaltChainedException
public java.lang.Class<?>[] getParameterTypes()
Function
getParameterTypes
in interface Function
public FeatureValue getFeatureValue()
FeatureFunction
getFeatureValue
in interface FeatureFunction
public int getCode(java.lang.String symbol) throws MaltChainedException
FeatureFunction
symbol
according to the feature function.getCode
in interface FeatureFunction
symbol
- the string representation of the symbolsymbol
according to the feature function.MaltChainedException
public java.lang.String getSymbol(int code) throws MaltChainedException
FeatureFunction
code
according to the feature function.getSymbol
in interface FeatureFunction
code
- the integer representation of the symbolcode
according to the feature function.MaltChainedException
public void update() throws MaltChainedException
Function
update
in interface Function
MaltChainedException
public FeatureFunction getParentFeature()
public void setParentFeature(FeatureFunction feature)
public int getPrefixLength()
public void setPrefixLength(int prefixLength)
public SymbolTableHandler getTableHandler()
public SymbolTable getSymbolTable()
FeatureFunction
getSymbolTable
in interface FeatureFunction
public void setSymbolTable(SymbolTable table)
public DataFormatInstance getDataFormatInstance()
public ColumnDescription getColumn()
protected void setColumn(ColumnDescription column)
public int getType()
getType
in interface FeatureFunction
public java.lang.String getMapIdentifier()
getMapIdentifier
in interface FeatureFunction
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2007-2017 Johan Hall, Jens Nilsson and Joakim Nivre.