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

public class TextExtractorVerbalizedRDF extends TextExtractorRDFBase
This extractor creates only one text per resource which describes it by verbalizing each statement where the resource is in the subject position. For each RDFNode (subjetc, predicate, object) the corresponding label is used as textual representation. If the object is a label, the lexical form is used. Only the statements which contain label information are dropped because the information is already included in the other statements. An example for a simple class: A subclass of B. A disjoit with X.
  • Field Details

    • labelExtractor

      private static final TextExtractorOnlyLabel labelExtractor
    • lineByLineTranslation

      protected boolean lineByLineTranslation
    • includeQuotes

      protected boolean includeQuotes
    • LABEL_PROPERTIES

      private static Set<org.apache.jena.rdf.model.Property> LABEL_PROPERTIES
  • Constructor Details

    • TextExtractorVerbalizedRDF

      public TextExtractorVerbalizedRDF(boolean lineByLineTranslation, boolean includeQuotes)
      Parameters:
      lineByLineTranslation - if set to true, this will always repeat the subject. E.g. A subclass of B. A disjoit with X. etc
      includeQuotes - if true, the subject and object (represented by their labels) will be quoted such that there is a clear separation.
    • TextExtractorVerbalizedRDF

      public TextExtractorVerbalizedRDF()
  • Method Details

    • extract

      public Set<String> extract(org.apache.jena.rdf.model.Resource r)
      Description copied from interface: TextExtractor
      Given a Jena resource this method extracts textual/string representations from it.
      Parameters:
      r - the jena resource which also allows to traverse the whole rdf graph
      Returns:
      a set of textual representations of the given resource.
    • optionallyQuote

      protected String optionallyQuote(String text)
    • isLineByLineTranslation

      public boolean isLineByLineTranslation()
    • setLineByLineTranslation

      public TextExtractorVerbalizedRDF setLineByLineTranslation(boolean lineByLineTranslation)
    • isIncludeQuotes

      public boolean isIncludeQuotes()
    • setIncludeQuotes

      public TextExtractorVerbalizedRDF setIncludeQuotes(boolean includeQuotes)