Package opennlp.tools.ml.model

# Class AbstractDataIndexer<P extends opennlp.tools.util.Parameters>

java.lang.Object
opennlp.tools.ml.model.AbstractDataIndexer<P>

All Implemented Interfaces:
  `opennlp.tools.ml.model.DataIndexer<P>`

Direct Known Subclasses:
  `OnePassDataIndexer`, `TwoPassDataIndexer`

public abstract class AbstractDataIndexer<P extends opennlp.tools.util.Parameters> extends Object implements opennlp.tools.ml.model.DataIndexer<P>
Abstract `DataIndexer` implementation for collecting event and context counts used in training.

See Also:
  - `DataIndexer`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final boolean`
  `SORT_DEFAULT`
  `static final String`
  `SORT_PARAM`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractDataIndexer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int[][]`
  `getContexts()`
  `int`
  `getNumEvents()`
  `int[]`
  `getNumTimesEventsSeen()`
  `String[]`
  `getOutcomeLabels()`
  `int[]`
  `getOutcomeList()`
  `int[]`
  `getPredCounts()`
  `String[]`
  `getPredLabels()`
  `float[][]`
  `getValues()`
  `void`
  `init(P indexingParameters, Map<String,String> reportMap)`

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

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

  ### Methods inherited from interface opennlp.tools.ml.model.DataIndexer

  `index`

- ## Field Details

  - ### SORT_PARAM

    public static final String SORT_PARAM
    See Also:
      - Constant Field Values

  - ### SORT_DEFAULT

    public static final boolean SORT_DEFAULT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AbstractDataIndexer

    public AbstractDataIndexer()

- ## Method Details

  - ### init

    public void init(P indexingParameters, Map<String,String> reportMap)
    Specified by:
      `init` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getContexts

    public int[][] getContexts()
    Specified by:
      `getContexts` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getNumTimesEventsSeen

    public int[] getNumTimesEventsSeen()
    Specified by:
      `getNumTimesEventsSeen` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getOutcomeList

    public int[] getOutcomeList()
    Specified by:
      `getOutcomeList` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getPredLabels

    public String[] getPredLabels()
    Specified by:
      `getPredLabels` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getOutcomeLabels

    public String[] getOutcomeLabels()
    Specified by:
      `getOutcomeLabels` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getPredCounts

    public int[] getPredCounts()
    Specified by:
      `getPredCounts` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getNumEvents

    public int getNumEvents()
    Specified by:
      `getNumEvents` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`

  - ### getValues

    public float[][] getValues()
    Specified by:
      `getValues` in interface `opennlp.tools.ml.model.DataIndexer<P extends opennlp.tools.util.Parameters>`