MaltParser 1.4.1

org.maltparser.core.feature.map
Class MergeFeature

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

public class MergeFeature
extends Object
implements FeatureMapFunction

Author:
Johan Hall

Field Summary
protected  FeatureFunction firstFeature
           
protected  FeatureFunction secondFeature
           
protected  SingleFeatureValue singleFeatureValue
           
protected  SymbolTable table
           
protected  SymbolTableHandler tableHandler
           
 
Constructor Summary
MergeFeature(SymbolTableHandler tableHandler)
           
 
Method Summary
 boolean equals(Object obj)
           
 int getCode(String symbol)
          Returns the integer representation of the string symbol according to the feature function.
 FeatureValue getFeatureValue()
          Returns the feature value
 FeatureFunction getFirstFeature()
           
 Class<?>[] getParameterTypes()
          Returns an array of class types used by the feature extraction system to invoke initialize with correct arguments.
 FeatureFunction getSecondFeature()
           
 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()
           
 void initialize(Object[] arguments)
          Initialize the feature function
 void setFirstFeature(FeatureFunction firstFeature)
           
 void setSecondFeature(FeatureFunction secondFeature)
           
 void setSymbolTable(SymbolTable table)
           
 void setTableHandler(SymbolTableHandler tableHandler)
           
 String toString()
           
 void update()
          Cause the feature function to update the feature value.
 void updateCardinality()
          Cause the feature function to update the cardinality of the feature value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

firstFeature

protected FeatureFunction firstFeature

secondFeature

protected FeatureFunction secondFeature

tableHandler

protected SymbolTableHandler tableHandler

table

protected SymbolTable table

singleFeatureValue

protected SingleFeatureValue singleFeatureValue
Constructor Detail

MergeFeature

public MergeFeature(SymbolTableHandler tableHandler)
             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

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

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

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

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

updateCardinality

public void updateCardinality()
                       throws MaltChainedException
Description copied from interface: FeatureFunction
Cause the feature function to update the cardinality of the feature value.

Specified by:
updateCardinality in interface FeatureFunction
Throws:
MaltChainedException

getFirstFeature

public FeatureFunction getFirstFeature()

setFirstFeature

public void setFirstFeature(FeatureFunction firstFeature)

getSecondFeature

public FeatureFunction getSecondFeature()

setSecondFeature

public void setSecondFeature(FeatureFunction secondFeature)

getTableHandler

public SymbolTableHandler getTableHandler()

setTableHandler

public void setTableHandler(SymbolTableHandler tableHandler)

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)

equals

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

toString

public String toString()
Overrides:
toString in class Object

MaltParser 1.4.1

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