Class ParisMatcher
java.lang.Object
eu.sealsproject.platform.res.tool.impl.AbstractPlugin
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAA
de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAAJena
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.wrapper.ParisMatcher
- 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
This is a wrapper for PARIS matching system by Fabian Suchanek et al.
The corresponding paper is called PARIS: Probabilistic Alignment of Relations, Instances, and Schema.
It will download the matcher if not already done and execute it as an external process. The equivalence files of the last iteration
are then read into a YAAA aligment. It is tested to run with java 1.7 and 1.8.
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
Compare file names by containing numbers. -
Field Summary
Modifier and TypeFieldDescriptionprivate String
The java command which is usually just "java" but can also be a fully qualified path to a java runtime.A list of java runtime arguments like "-Xmx2g" or the likeprivate static final org.slf4j.Logger
private static final URL
private File
Path to the Paris matcher jar file.private File
Folder in which the ontologies and output file of PARIS are stored.Fields inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
FILE_PREFIX, FILE_SUFFIX
-
Constructor Summary
ConstructorDescriptionConstructor which expects the Paris matcher to be in the working directory and called "paris.jar".ParisMatcher
(File pathToParisJar) Constructor which uses the default java executable (available in PATH) and no java parameters are used.ParisMatcher
(File pathToParisJar, File tmpFolder, String javaCommand, List<String> javaRuntimeArguments) Constructor with all attributes.ParisMatcher
(File pathToParisJar, String javaCommand, List<String> javaRuntimeArguments) Constructor which uses a temp directory as a storage for files produced by PARIS.ParisMatcher
(List<String> javaRuntimeArguments) Constructor which only needs the additional java runtime arguments. -
Method Summary
Modifier and TypeMethodDescriptionprivate static URL
private Alignment
findEquivalence
(Alignment directionOne, Alignment directionTwo) private Alignment
getAlignment
(File outputFolder) private Alignment
getAlignmentHighestIteration
(List<File> files) match
(URL source, URL target, Alignment inputAlignment, Properties properties) Aligns two ontologies specified via URL, with an input alignment as Alignment object, and returns the mapping of the resulting alignment.match
(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment.private void
modelToNTripleFile
(org.apache.jena.rdf.model.Model m, File file) private void
runProcess
(File tmpFolderForResults) private void
urlToNTripleFile
(URL url, File file) Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAAJena
getModelSpec, readOntology
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_jena.MatcherYAAA
match
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherFile
match
Methods inherited from class de.uni_mannheim.informatik.dws.melt.matching_base.MatcherURL
align, align, canExecute, getType
Methods inherited from class eu.sealsproject.platform.res.tool.impl.AbstractPlugin
getId, getVersion, setId, setVersion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.sealsproject.platform.res.tool.api.IPlugin
getId, getVersion
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PARIS_WEB_LOCATION
-
pathToParisJar
Path to the Paris matcher jar file. -
tmpFolder
Folder in which the ontologies and output file of PARIS are stored. The created folders in it are removed after a run. -
javaCommand
The java command which is usually just "java" but can also be a fully qualified path to a java runtime. -
javaRuntimeArguments
A list of java runtime arguments like "-Xmx2g" or the like
-
-
Constructor Details
-
ParisMatcher
public ParisMatcher(File pathToParisJar, File tmpFolder, String javaCommand, List<String> javaRuntimeArguments) Constructor with all attributes. Be careful with the second parameter because the provided folder is deleted after a run. Thus specify a non existent folder which is created and then removed.- Parameters:
pathToParisJar
- Path to the Paris matcher jar file. If file is not existent then version 0.3 it will be downloaded.tmpFolder
- Folder in which the ontologies and output file of PARIS are stored. The created folders in it are removed after a run.javaCommand
- The java command which is usually just "java" but can also be a fully qualified path to a java runtime.javaRuntimeArguments
- A list of java runtime arguments like "-Xmx2g" or the like
-
ParisMatcher
Constructor which uses a temp directory as a storage for files produced by PARIS.- Parameters:
pathToParisJar
- Path to the Paris matcher jar file. If file is not existent then version 0.3 it will be downloaded.javaCommand
- The java command which is usually just "java" but can also be a fully qualified path to a java runtime.javaRuntimeArguments
- A list of java runtime arguments like "-Xmx2g" or the like
-
ParisMatcher
Constructor which uses the default java executable (available in PATH) and no java parameters are used. A temp directory as a storage for files produced by PARIS is used.- Parameters:
pathToParisJar
- Path to the Paris matcher jar file. If file is not existent then version 0.3 it will be downloaded.
-
ParisMatcher
Constructor which only needs the additional java runtime arguments. A temp directory as a storage for files produced by PARIS is used.- Parameters:
javaRuntimeArguments
- A list of java runtime arguments like "-Xmx2g" or the like
-
ParisMatcher
public ParisMatcher()Constructor which expects the Paris matcher to be in the working directory and called "paris.jar". It uses the default java executable (available in PATH) and maximum heap size of 10G. A temp directory as a storage for files produced by PARIS is used.
-
-
Method Details
-
match
public Alignment match(URL source, URL target, Alignment inputAlignment, Properties properties) throws Exception Description copied from class:MatcherYAAA
Aligns two ontologies specified via URL, with an input alignment as Alignment object, and returns the mapping of the resulting alignment. Note: This method might be called multiple times in a row when using the evaluation framework. Make sure to return a mapping which is specific to the given inputs.- Overrides:
match
in classMatcherYAAAJena
- Parameters:
source
- this url represents the source ontologytarget
- this url represents the target ontologyinputAlignment
- this mapping represents the input alignmentproperties
- additional properties- Returns:
- The resulting mapping of the matching process.
- Throws:
Exception
- An exception that was risen while matching.
-
match
public Alignment match(org.apache.jena.ontology.OntModel source, org.apache.jena.ontology.OntModel target, Alignment inputAlignment, Properties properties) throws Exception Description copied from class:MatcherYAAAJena
Aligns two ontologies specified via a Jena OntModel, with an input alignment as Alignment object, and returns the mapping of the resulting alignment. Note: This method might be called multiple times in a row when using the evaluation framework. Make sure to return a mapping which is specific to the given inputs.- Specified by:
match
in interfaceIMatcher<org.apache.jena.ontology.OntModel,
Alignment, Properties> - Specified by:
match
in classMatcherYAAAJena
- Parameters:
source
- This OntModel represents the source ontology.target
- This OntModel represents the target ontology.inputAlignment
- This mapping represents the input alignment.properties
- Additional properties.- Returns:
- The resulting alignment of the matching process.
- Throws:
Exception
- Any exception which occurs during matching.
-
runProcess
- Throws:
IOException
InterruptedException
-
getAlignment
-
findEquivalence
-
getAlignmentHighestIteration
-
urlToNTripleFile
-
modelToNTripleFile
-
createURL
-