Class IdentityExtractor

java.lang.Object
org.tribuo.data.columnar.extractors.SimpleFieldExtractor<String>
org.tribuo.data.columnar.extractors.IdentityExtractor
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, FieldExtractor<String>

public class IdentityExtractor extends SimpleFieldExtractor<String>
Extracts the field value and emits it as a String.
  • Constructor Details

    • IdentityExtractor

      public IdentityExtractor(String fieldName)
      Extracts the String value from the supplied field. Writes the metadata out using the field name as the key.
      Parameters:
      fieldName - The field name to inspect.
    • IdentityExtractor

      public IdentityExtractor(String fieldName, String metadataName)
      Extracts the String value from the supplied field. Writes the metadata out using the metadataName as the key.
      Parameters:
      fieldName - The field name to inspect.
      metadataName - The metadata name to emit.
  • Method Details

    • getValueType

      public Class<String> getValueType()
      Description copied from interface: FieldExtractor
      Gets the class of the value produced by this extractor.
      Returns:
      The class of the value.
    • extractField

      protected Optional<String> extractField(String value)
      Description copied from class: SimpleFieldExtractor
      Extracts the field value, or returns Optional.empty() if it failed to parse.
      Specified by:
      extractField in class SimpleFieldExtractor<String>
      Parameters:
      value - The field value to read.
      Returns:
      The extracted value.
    • getProvenance

      public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()