MaltParser 1.2

org.maltparser.parser.algorithm.covington
Class CovAddressFunction

java.lang.Object
  extended by org.maltparser.core.feature.function.AddressFunction
      extended by org.maltparser.parser.algorithm.covington.CovAddressFunction
All Implemented Interfaces:
Function

public class CovAddressFunction
extends AddressFunction

Since:
1.1
Author:
Johan Hall

Nested Class Summary
static class CovAddressFunction.CovSubFunction
           
 
Field Summary
protected  int index
           
protected  Covington parsingAlgorithm
           
protected  CovAddressFunction.CovSubFunction subFunction
           
protected  String subFunctionName
           
 
Fields inherited from class org.maltparser.core.feature.function.AddressFunction
address
 
Constructor Summary
CovAddressFunction(String subFunctionName, ParsingAlgorithm parsingAlgorithm)
           
 
Method Summary
 boolean equals(Object obj)
           
 AddressValue getAddressValue()
          Returns the address value of address function
 int getIndex()
          Returns the index that is used for indexing the data structures: Left, Right, LeftContext and RightContext
 Class<?>[] getParameterTypes()
          Returns an array of class types used by the feature extraction system to invoke initialize with correct arguments.
 Covington getParsingAlgorithm()
          Returns one of the two version of the covington parsing algorithm
 CovAddressFunction.CovSubFunction getSubFunction()
          Returns the subfunction (LEFT, RIGHT, LEFTCONTEXT, RIGHTCONTEXT)
 String getSubFunctionName()
          Returns the string representation of subfunction name
 void initialize(Object[] arguments)
          Initialize the feature function
 void setIndex(int index)
          Sets the index that is used for indexing the data structures: Left, Right, LeftContext and RightContext
 void setParsingAlgorithm(Covington parsingAlgorithm)
          Sets the parsing algorthm
 void setSubFunctionName(String subFunctionName)
          Sets the string representation of subFunction name
 String toString()
           
 void update()
          Cause the feature function to update the feature value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subFunctionName

protected String subFunctionName

subFunction

protected CovAddressFunction.CovSubFunction subFunction

parsingAlgorithm

protected Covington parsingAlgorithm

index

protected int index
Constructor Detail

CovAddressFunction

public CovAddressFunction(String subFunctionName,
                          ParsingAlgorithm parsingAlgorithm)
Method Detail

initialize

public void initialize(Object[] arguments)
                throws MaltChainedException
Description copied from interface: Function
Initialize the feature 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.

Returns:
an array of class types

update

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

Throws:
MaltChainedException

getSubFunctionName

public String getSubFunctionName()
Returns the string representation of subfunction name

Returns:
the string representation of subfunction name

setSubFunctionName

public void setSubFunctionName(String subFunctionName)
Sets the string representation of subFunction name

Parameters:
subFunctionName - the subfunction name

getSubFunction

public CovAddressFunction.CovSubFunction getSubFunction()
Returns the subfunction (LEFT, RIGHT, LEFTCONTEXT, RIGHTCONTEXT)

Returns:
the subfunction (LEFT, RIGHT, LEFTCONTEXT, RIGHTCONTEXT)

getAddressValue

public AddressValue getAddressValue()
Description copied from class: AddressFunction
Returns the address value of address function

Overrides:
getAddressValue in class AddressFunction
Returns:
the address value of address function

getParsingAlgorithm

public Covington getParsingAlgorithm()
Returns one of the two version of the covington parsing algorithm

Returns:
one of the two version of the covington parsing algorithm

setParsingAlgorithm

public void setParsingAlgorithm(Covington parsingAlgorithm)
Sets the parsing algorthm

Parameters:
parsingAlgorithm - a covington parsing algorithm

getIndex

public int getIndex()
Returns the index that is used for indexing the data structures: Left, Right, LeftContext and RightContext

Returns:
the index that is used for indexing the data structures: Left, Right, LeftContext and RightContext

setIndex

public void setIndex(int index)
Sets the index that is used for indexing the data structures: Left, Right, LeftContext and RightContext

Parameters:
index - the index

equals

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

toString

public String toString()
Overrides:
toString in class AddressFunction

MaltParser 1.2

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