opennlp.tools.util.featuregen
Class FeatureGeneratorUtil
java.lang.Object
opennlp.tools.util.featuregen.FeatureGeneratorUtil
public class FeatureGeneratorUtil
- extends Object
This class provide common utilities for feature generation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeatureGeneratorUtil
public FeatureGeneratorUtil()
tokenFeature
public static String tokenFeature(String token)
- Generates a class name for the specified token.
The classes are as follows where the first matching class is used:
- lc - lowercase alphabetic
- 2d - two digits
- 4d - four digits
- an - alpha-numeric
- dd - digits and dashes
- ds - digits and slashes
- dc - digits and commas
- dp - digits and periods
- num - digits
- sc - single capital letter
- ac - all capital letters
- ic - initial capital letter
- other - other
- Parameters:
token
- A token or word.
- Returns:
- The class name that the specified token belongs in.
Copyright © 2010. All Rights Reserved.