MaltParser 1.4.1

org.maltparser.core.syntaxgraph.feature
Class ExistsFeature

java.lang.Object
  extended by org.maltparser.core.syntaxgraph.feature.ExistsFeature
All Implemented Interfaces:
FeatureFunction, Function

public class ExistsFeature
extends Object
implements FeatureFunction


Field Summary
protected  AddressFunction addressFunction
           
protected  SingleFeatureValue featureValue
           
protected  SymbolTable table
           
protected  SymbolTableHandler tableHandler
           
 
Constructor Summary
ExistsFeature(SymbolTableHandler tableHandler)
           
 
Method Summary
 boolean equals(Object obj)
           
 AddressFunction getAddressFunction()
          Returns the address function
 int getCode(String symbol)
          Returns the integer representation of the string symbol according to the exists feature function.
 FeatureValue getFeatureValue()
          Returns the feature value
 Class<?>[] getParameterTypes()
          Returns an array of class types used by the feature extraction system to invoke initialize with correct arguments.
 String getSymbol(int code)
          Returns the string representation of the integer code according to the exists feature function.
 SymbolTable getSymbolTable()
          Returns the symbol table used by the exists feature function
 SymbolTableHandler getTableHandler()
          Returns symbol table handler
 int hashCode()
           
 void initialize(Object[] arguments)
          Initialize the exists feature function
 void setAddressFunction(AddressFunction addressFunction)
          Sets the address function
 void setSymbolTable(SymbolTable table)
          Sets the symbol table used by the exists feature function
 void setTableHandler(SymbolTableHandler tableHandler)
          Sets the symbol table handler
 String toString()
           
 void update()
          Cause the feature function to update the feature value.
 void updateCardinality()
          Cause the exists feature function to update the cardinality of the feature value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

addressFunction

protected AddressFunction addressFunction

tableHandler

protected SymbolTableHandler tableHandler

table

protected SymbolTable table

featureValue

protected SingleFeatureValue featureValue
Constructor Detail

ExistsFeature

public ExistsFeature(SymbolTableHandler tableHandler)
              throws MaltChainedException
Throws:
MaltChainedException
Method Detail

initialize

public void initialize(Object[] arguments)
                throws MaltChainedException
Initialize the exists 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()
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

getSymbol

public String getSymbol(int code)
                 throws MaltChainedException
Returns the string representation of the integer code according to the exists 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 exists feature function.
Throws:
MaltChainedException

getCode

public int getCode(String symbol)
            throws MaltChainedException
Returns the integer representation of the string symbol according to the exists 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 exists feature function.
Throws:
MaltChainedException

updateCardinality

public void updateCardinality()
Cause the exists feature function to update the cardinality of the feature value.

Specified by:
updateCardinality in interface FeatureFunction
Throws:
MaltChainedException

update

public void update()
            throws MaltChainedException
Cause the feature function to update the feature value.

Specified by:
update in interface Function
Throws:
MaltChainedException

getFeatureValue

public FeatureValue getFeatureValue()
Returns the feature value

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

getSymbolTable

public SymbolTable getSymbolTable()
Returns the symbol table used by the exists feature function

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

getAddressFunction

public AddressFunction getAddressFunction()
Returns the address function

Returns:
the address function

setAddressFunction

public void setAddressFunction(AddressFunction addressFunction)
Sets the address function

Parameters:
addressFunction - a address function

getTableHandler

public SymbolTableHandler getTableHandler()
Returns symbol table handler

Returns:
a symbol table handler

setTableHandler

public void setTableHandler(SymbolTableHandler tableHandler)
Sets the symbol table handler

Parameters:
tableHandler - a symbol table handler

setSymbolTable

public void setSymbolTable(SymbolTable table)
Sets the symbol table used by the exists feature function

Parameters:
table -

equals

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

hashCode

public int hashCode()
Overrides:
hashCode 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.