MaltParser 1.0.3

org.maltparser.parser.guide.feature
Class Feature

java.lang.Object
  extended by org.maltparser.parser.guide.feature.Feature
Direct Known Subclasses:
AtomicFeature, SplitFeature, SuffixFeature

public abstract class Feature
extends Object

Since:
1.0
Author:
Johan Hall

Field Summary
protected  int cardinality
           
protected  Map<Integer,Boolean> featureKnown
           
protected  SortedMap<Integer,String> featureValues
           
protected  boolean nullValue
           
protected  ParsingAlgorithm parsingAlgorithm
           
 
Constructor Summary
Feature()
           
 
Method Summary
 boolean equals(Object obj)
           
 int getCardinality()
          Returns the cardinality (the number of distinct values) of the feature
 Integer getFirstIntegerValue()
           
 String getFirstStringValue()
           
abstract  Integer getIntegerValue(String value)
           
 Set<Integer> getIntegerValues()
           
protected  ParsingAlgorithm getParsingAlgorithm()
           
abstract  String getStringValue(Integer value)
           
 Set<String> getStringValues()
           
 Map<Integer,String> getValues()
           
 void init()
           
abstract  boolean init(String spec)
           
 void initialize(ParsingAlgorithm parsingAlgorithm)
           
 boolean isKnown(int value)
           
 boolean isNullValue()
           
 void setCardinality(int cardinality)
          Sets the cardinality (the number of distinct values) of the feature
protected  void setParsingAlgorithm(ParsingAlgorithm parsingAlgorithm)
           
abstract  void setValue(Integer value)
           
abstract  void setValue(String value)
           
 String toString()
           
abstract  void update()
           
abstract  void updateCardinality()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

featureValues

protected SortedMap<Integer,String> featureValues

cardinality

protected int cardinality

featureKnown

protected Map<Integer,Boolean> featureKnown

nullValue

protected boolean nullValue

parsingAlgorithm

protected ParsingAlgorithm parsingAlgorithm
Constructor Detail

Feature

public Feature()
        throws MaltChainedException
Throws:
MaltChainedException
Method Detail

init

public void init()
          throws MaltChainedException
Throws:
MaltChainedException

initialize

public void initialize(ParsingAlgorithm parsingAlgorithm)
                throws MaltChainedException
Throws:
MaltChainedException

setParsingAlgorithm

protected void setParsingAlgorithm(ParsingAlgorithm parsingAlgorithm)

getCardinality

public int getCardinality()
Returns the cardinality (the number of distinct values) of the feature

Returns:
the cardinality (the number of distinct values) of the feature

setCardinality

public void setCardinality(int cardinality)
Sets the cardinality (the number of distinct values) of the feature

Parameters:
cardinality - the cardinality (the number of distinct values)

update

public abstract void update()
                     throws MaltChainedException
Throws:
MaltChainedException

init

public abstract boolean init(String spec)
                      throws MaltChainedException
Throws:
MaltChainedException

updateCardinality

public abstract void updateCardinality()
                                throws MaltChainedException
Throws:
MaltChainedException

getStringValue

public abstract String getStringValue(Integer value)
                               throws MaltChainedException
Throws:
MaltChainedException

getIntegerValue

public abstract Integer getIntegerValue(String value)
                                 throws MaltChainedException
Throws:
MaltChainedException

setValue

public abstract void setValue(Integer value)
                       throws MaltChainedException
Throws:
MaltChainedException

setValue

public abstract void setValue(String value)
                       throws MaltChainedException
Throws:
MaltChainedException

getValues

public Map<Integer,String> getValues()

getIntegerValues

public Set<Integer> getIntegerValues()

getFirstIntegerValue

public Integer getFirstIntegerValue()

getStringValues

public Set<String> getStringValues()

getFirstStringValue

public String getFirstStringValue()

isKnown

public boolean isKnown(int value)

isNullValue

public boolean isNullValue()

getParsingAlgorithm

protected ParsingAlgorithm getParsingAlgorithm()

equals

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

toString

public String toString()
Overrides:
toString in class Object

MaltParser 1.0.3

Copyright 2007 Johan Hall, Jens Nilsson and Joakim Nivre.