Package opennlp.tools.ml.maxent

# Class BasicContextGenerator

java.lang.Object
opennlp.tools.ml.maxent.BasicContextGenerator

All Implemented Interfaces:
  `ContextGenerator<String>`

public class BasicContextGenerator extends Object implements ContextGenerator<String>
A `ContextGenerator` implementation for maxent decisions, assuming that the input given to the `getContext(String)` method is a String containing contextual predicates separated by spaces, for instance:

`cp_1 cp_2 ... cp_n`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BasicContextGenerator()`
  `BasicContextGenerator(String sep)`
  Initializes a `BasicContextGenerator` with a different separator char.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `getContext(String o)`
  Builds up the list of contextual predicates given an `object`.

  ### Methods inherited from class java.lang.Object

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

- ## Constructor Details

  - ### BasicContextGenerator

    public BasicContextGenerator()

  - ### BasicContextGenerator

    public BasicContextGenerator(String sep)
    Initializes a `BasicContextGenerator` with a different separator char. This overwrites the default whitespace separator.
    Parameters:
      `sep` - The `separator character` to use.

- ## Method Details

  - ### getContext

    public String[] getContext(String o)
    Description copied from interface: `ContextGenerator`
    Builds up the list of contextual predicates given an `object`.
    Specified by:
      `getContext` in interface `ContextGenerator<String>`
    Parameters:
      `o` - The `object` used as input.