Class DocumentSimilarityBase

All Implemented Interfaces:
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
Direct Known Subclasses:
Doc2vecModelMatcher, VectorSpaceModelMatcher

public abstract class DocumentSimilarityBase
extends MatcherYAAAJena
A base class for all matchers which write a csv file where every line represents a resource with with cell as identifier like URI and second cell the corresponding tokens (whitespace separated).
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NEW_LINE

      private static final String NEW_LINE
    • corpusFile

      protected File corpusFile
    • textProperties

      protected Collection<org.apache.jena.rdf.model.Property> textProperties
    • addFragment

      protected boolean addFragment
    • matchClasses

      protected boolean matchClasses
    • matchProperties

      protected boolean matchProperties
    • matchIndividuals

      protected boolean matchIndividuals
  • Constructor Details

    • DocumentSimilarityBase

      public DocumentSimilarityBase()
  • Method Details

    • createCorpusFileIfNecessary

      protected void createCorpusFileIfNecessary​(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target) throws IOException
      Throws:
      IOException
    • writeResourceText

      protected void writeResourceText​(org.apache.jena.util.iterator.ExtendedIterator<? extends org.apache.jena.ontology.OntResource> resources, Writer writer) throws IOException
      Throws:
      IOException
    • getResourceText

      protected String getResourceText​(org.apache.jena.ontology.OntResource r)
    • processText

      protected String processText​(String text)
    • isString

      protected static boolean isString​(org.apache.jena.rdf.model.Literal lit)
    • isBlank

      public static boolean isBlank​(String str)