MaltParser 1.5.3

org.maltparser.core.feature.map
Class PrefixFeature

java.lang.Object
  extended by org.maltparser.core.feature.map.PrefixFeature
All Implemented Interfaces:
FeatureFunction, FeatureMapFunction, Function

public class PrefixFeature
extends Object
implements FeatureMapFunction

Author:
Johan Hall

Field Summary
protected  ColumnDescription column
           
protected  DataFormatInstance dataFormatInstance
           
protected  MultipleFeatureValue multipleFeatureValue
           
protected  FeatureFunction parentFeature
           
protected  int prefixLength
           
protected  SymbolTable table
           
protected  SymbolTableHandler tableHandler
           
 
Constructor Summary
PrefixFeature(DataFormatInstance dataFormatInstance)
           
 
Method Summary
 boolean equals(Object obj)
           
 int getCode(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
 String getMapIdentifier()
           
 Class<?>[] getParameterTypes()
          Returns an array of class types used by the feature extraction system to invoke initialize with correct arguments.
 FeatureFunction getParentFeature()
           
 int getPrefixLength()
           
 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(Object[] arguments)
          Initialize the feature function
protected  void setColumn(ColumnDescription column)
           
 void setDataFormatInstance(DataFormatInstance dataFormatInstance)
           
 void setParentFeature(FeatureFunction feature)
           
 void setPrefixLength(int prefixLength)
           
 void setSymbolTable(SymbolTable table)
           
 String toString()
           
 void update()
          Cause the feature function to update the feature value.
 void updateCardinality()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parentFeature

protected FeatureFunction parentFeature

multipleFeatureValue

protected MultipleFeatureValue multipleFeatureValue

tableHandler

protected SymbolTableHandler tableHandler

table

protected SymbolTable table

dataFormatInstance

protected DataFormatInstance dataFormatInstance

column

protected ColumnDescription column

prefixLength

protected int prefixLength
Constructor Detail

PrefixFeature

public PrefixFeature(DataFormatInstance dataFormatInstance)
              throws MaltChainedException
Throws:
MaltChainedException
Method Detail

initialize

public void initialize(Object[] arguments)
                throws MaltChainedException
Description copied from interface: Function
Initialize the feature function

Specified by:
initialize in interface Function
Parameters:
arguments - an array of arguments with the type returned by getParameterTypes()
Throws:
MaltChainedException

getParameterTypes

public Class<?>[] getParameterTypes()
Description copied from interface: Function
Returns an array of class types used by the feature extraction system to invoke initialize with correct arguments.

Specified by:
getParameterTypes in interface Function
Returns:
an array of class types

getFeatureValue

public FeatureValue getFeatureValue()
Description copied from interface: FeatureFunction
Returns the feature value

Specified by:
getFeatureValue in interface FeatureFunction
Returns:
the feature value

getCode

public int getCode(String symbol)
            throws MaltChainedException
Description copied from interface: FeatureFunction
Returns the integer representation of the string symbol according to the feature function.

Specified by:
getCode in interface FeatureFunction
Parameters:
symbol - the string representation of the symbol
Returns:
the integer representation of the string symbol according to the feature function.
Throws:
MaltChainedException

getSymbol

public String getSymbol(int code)
                 throws MaltChainedException
Description copied from interface: FeatureFunction
Returns the string representation of the integer code according to the feature function.

Specified by:
getSymbol in interface FeatureFunction
Parameters:
code - the integer representation of the symbol
Returns:
the string representation of the integer code according to the feature function.
Throws:
MaltChainedException

update

public void update()
            throws MaltChainedException
Description copied from interface: Function
Cause the feature function to update the feature value.

Specified by:
update in interface Function
Throws:
MaltChainedException

updateCardinality

public void updateCardinality()
                       throws MaltChainedException
Throws:
MaltChainedException

getParentFeature

public FeatureFunction getParentFeature()

setParentFeature

public void setParentFeature(FeatureFunction feature)

getPrefixLength

public int getPrefixLength()

setPrefixLength

public void setPrefixLength(int prefixLength)

getTableHandler

public SymbolTableHandler getTableHandler()

getSymbolTable

public SymbolTable getSymbolTable()
Description copied from interface: FeatureFunction
Returns the symbol table used by the feature function.

Specified by:
getSymbolTable in interface FeatureFunction
Returns:
the symbol table used by the feature function.

setSymbolTable

public void setSymbolTable(SymbolTable table)

getDataFormatInstance

public DataFormatInstance getDataFormatInstance()

setDataFormatInstance

public void setDataFormatInstance(DataFormatInstance dataFormatInstance)

getColumn

public ColumnDescription getColumn()

setColumn

protected void setColumn(ColumnDescription column)

getType

public int getType()
Specified by:
getType in interface FeatureFunction

getMapIdentifier

public String getMapIdentifier()
Specified by:
getMapIdentifier in interface FeatureFunction

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

MaltParser 1.5.3

Copyright 2007-2011 Johan Hall, Jens Nilsson and Joakim Nivre.