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 Details

  • 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>