BrownTokenClasses (Apache OpenNLP Tools 2.5.9 API)
Description: declaration: package: opennlp.tools.util.featuregen, class: BrownTokenClasses

# Class BrownTokenClasses

java.lang.Object
opennlp.tools.util.featuregen.BrownTokenClasses

public class BrownTokenClasses extends Object
Obtain the paths listed in the pathLengths array from the Brown class. This class is not to be instantiated.

See Also:
  - `BrownCluster`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int[]`
  `pathLengths`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BrownTokenClasses()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static List<String>`
  `getWordClasses(String token, BrownCluster brownLexicon)`
  It provides a list containing the pathLengths for a token if found in the Map:token,BrownClass.

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### pathLengths

    public static final int[] pathLengths

- ## Constructor Details

  - ### BrownTokenClasses

    public BrownTokenClasses()

- ## Method Details

  - ### getWordClasses

    public static List<String> getWordClasses(String token, BrownCluster brownLexicon)
    It provides a list containing the pathLengths for a token if found in the Map:token,BrownClass.
    Parameters:
      `token` - The token to be looked up in the brown clustering map
      `brownLexicon` - The `BrownCluster` clustering map
    Returns:
      A list of the paths for a token.