edu.stanford.nlp.process
Class CapitalFeature

java.lang.Object
  |
  +--edu.stanford.nlp.process.CapitalFeature
All Implemented Interfaces:
Feature, Serializable

public class CapitalFeature
extends Object
implements Feature

Provides a partition over the set of possible unseen words that corresponds to the capitalization of characters in the word. Uses the CapitalFeatureValue class as possible values.

Author:
Teg Grenager grenager@cs.stanford.edu
See Also:
Serialized Form

Constructor Summary
CapitalFeature()
           
 
Method Summary
 FeatureValue[] allValues()
          An array of all possible FeatureValues for this Feature.
 FeatureValue getValue(String s)
          CDM: This could probably be redone using regular expressions.
 int numValues()
          The number of possible FeatureValues for this Feature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapitalFeature

public CapitalFeature()
Method Detail

numValues

public int numValues()
Description copied from interface: Feature
The number of possible FeatureValues for this Feature.

Specified by:
numValues in interface Feature

allValues

public FeatureValue[] allValues()
Description copied from interface: Feature
An array of all possible FeatureValues for this Feature.

Specified by:
allValues in interface Feature

getValue

public FeatureValue getValue(String s)
CDM: This could probably be redone using regular expressions. Using s.toCharArray() didn't seem to speed things up (reverse?).

Specified by:
getValue in interface Feature


Stanford NLP Group