java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.textExtractors.TextExtractorForTransformers
All Implemented Interfaces:
TextExtractor

public class TextExtractorForTransformers extends Object implements TextExtractor
A TextExtractor which extracts texts from a resource which can be used by transformer based matchers like TransformersFilter or TransformersFineTuner.
  • Field Details

  • Constructor Details

    • TextExtractorForTransformers

      public TextExtractorForTransformers(int minToken)
    • TextExtractorForTransformers

      public TextExtractorForTransformers()
  • Method Details

    • extract

      public Set<String> extract(org.apache.jena.rdf.model.Resource r)
      Returns a set of descriptions.
      Specified by:
      extract in interface TextExtractor
      Parameters:
      r - the jena resource which also allows to traverse the whole rdf graph
      Returns:
      Potentially multiple strings. If there are multiple strings but one string is a subset of another string, the subset will not be included. For example: Found strings: [(label) "heart", (comment) "The heart is..."] -> only "The heart is..." will be returned.
    • getPossibleLiterals

      private Set<ProcessedLiteral> getPossibleLiterals(org.apache.jena.rdf.model.Resource r)
    • updateContained

      private void updateContained(List<ProcessedLiteral> literals)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object