Interface FieldExtractor<T>

All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
All Known Implementing Classes:
DateExtractor, DoubleExtractor, FloatExtractor, IdentityExtractor, IndexExtractor, IntExtractor, OffsetDateTimeExtractor, SimpleFieldExtractor

public interface FieldExtractor<T> extends com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
Extracts a value from a field to be placed in an Example's metadata field. Principally used to pull out Strings and floats for example names and weights respectively.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns Optional which is filled if extraction succeeded.
    Gets the metadata key name.
    Gets the class of the value produced by this extractor.

    Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable

    postConfig

    Methods inherited from interface com.oracle.labs.mlrg.olcut.provenance.Provenancable

    getProvenance
  • Method Details

    • getMetadataName

      String getMetadataName()
      Gets the metadata key name. This is the key into which this value will be written in an Example if it is given to RowProcessor.
      Returns:
      The metadata key name.
    • getValueType

      Class<T> getValueType()
      Gets the class of the value produced by this extractor.
      Returns:
      The class of the value.
    • extract

      Returns Optional which is filled if extraction succeeded.
      Parameters:
      row - The raw row from which to extract a value
      Returns:
      A value.