Class FeatureGeneratorUtil

Namespace
NOpenNLP.Tools.Util.Featuregen
Assembly
NOpenNLP.Tools.dll

This class provide common utilities for feature generation.

public static class FeatureGeneratorUtil
Inheritance
FeatureGeneratorUtil
Inherited Members

Methods

TokenFeature(string)

Generates a class name for the specified token. The classes are as follows where the first matching class is used:

  • jah - Japanese Hiragana
  • jak - Japanese Katakana
  • 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
public static string TokenFeature(string token)

Parameters

token string

A token or word.

Returns

string

The class name that the specified token belongs in.