All Implemented Interfaces:
Filter, IMatcher<org.apache.jena.ontology.OntModel,Alignment,Properties>, eu.sealsproject.platform.res.domain.omt.IOntologyMatchingToolBridge, eu.sealsproject.platform.res.tool.api.IPlugin, eu.sealsproject.platform.res.tool.api.IToolBridge

public class RelationTypeFineTuner extends TransformersFineTuner
This matcher predicts the relation type given a transformer model. This component do not create new correspondences but refine the relation of given class correspondences.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NEWLINE

      private static final String NEWLINE
  • Constructor Details

    • RelationTypeFineTuner

      public RelationTypeFineTuner(TextExtractor extractor, String modelName, File resultingModelLocation)
    • RelationTypeFineTuner

      public RelationTypeFineTuner(TextExtractorMap extractor, String modelName, File resultingModelLocation)
  • Method Details

    • writeTrainingFile

      public int writeTrainingFile(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment trainingAlignment, File trainFile, boolean append) throws IOException
      Description copied from class: TransformersBaseFineTuner
      Writes the correspondences to a file (append or not can be chosen by a parameter).
      Overrides:
      writeTrainingFile in class TransformersBaseFineTuner
      Parameters:
      source - the source model
      target - the target model
      trainingAlignment - the training alignment to be written to file.
      trainFile - the file to write all texts
      append - true if all content should be appended to the file.
      Returns:
      how many correspondences were written to the file.
      Throws:
      IOException - in case the writing fails
    • writeRelationPredictionFormat

      protected int writeRelationPredictionFormat(org.apache.jena.rdf.model.Model model, Writer writer) throws IOException
      Throws:
      IOException