README.md 6.52 KB
Newer Older
1

2
# Ontology alignment API and implementation
3
# [https://moex.gitlabpages.inria.fr/alignapi/](https://moex.gitlabpages.inria.fr/alignapi/)
4 5 6
# 21/11/2020, version 4.10

<pre>
7 8
Copyright (C) 2003-2021 INRIA.
Copyright (C) 2004-2005 Université de Montréal.
9 10
Copyright (C) 2005 CNR Pisa.
Copyright (C) 2005 Konstantinos A. Nedas.
11 12 13
Copyright (C) 2006 CERT.
Copyright (C) 2006 Seungkeun Lee.
Copyright (C) 2006-2007 Orange R&D.
14 15 16 17 18 19 20 21 22 23 24

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

25 26
Read the [LICENSE.TXT](LICENSE.TXT) file for the terms of the LGPL license.
</pre>
27

28
## WHAT IS AN ONTOLOGY ALIGNMENT?
29

30
See [https://moex.gitlabpages.inria.fr/alignapi/](https://moex.gitlabpages.inria.fr/alignapi/).
31

Jérôme Euzenat's avatar
Jérôme Euzenat committed
32
See also http://www.ontologymatching.org
33

34
## USING THE ONTOLOGY ALIGNMENT API IMPLEMENTATION
35

36
### Building:
37

38
~~~~
39
$ ant jar
40 41
~~~~
(or ant `compileall`)
Jérôme Euzenat's avatar
Jérôme Euzenat committed
42

43
### Testing
Jérôme Euzenat's avatar
Jérôme Euzenat committed
44

45
~~~~
Jérôme Euzenat's avatar
Jérôme Euzenat committed
46
$ ant test
47
~~~~
48

49
### Running
50

51
For a better introduction, see the tutorial at https://moex.gitlabpages.inria.fr/alignapi/tutorial
52
or find it as a script in `html/tutorial/script.sh`
Jérôme Euzenat's avatar
Jérôme Euzenat committed
53

54
~~~~
55
$ export CWD=`pwd`
56 57 58

$ java -jar lib/procalign.jar --help

59
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl
60

61
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -r fr.inrialpes.exmo.align.impl.renderer.OWLAxiomsRendererVisitor
62

63
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -t 0.4 -o examples/rdf/sample.rdf
64

65
$ java -cp lib/procalign.jar fr.inrialpes.exmo.align.cli.ParserPrinter file:examples/rdf/newsample.rdf
66

67
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/onto1.owl file://$CWD/examples/rdf/onto2.owl -a examples/rdf/sample.rdf
68

Jérôme Euzenat's avatar
Jérôme Euzenat committed
69
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl
70

Jérôme Euzenat's avatar
Jérôme Euzenat committed
71
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -o examples/rdf/bibref.rdf
72

Jérôme Euzenat's avatar
Jérôme Euzenat committed
73
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=subStringDistance -t .4 -o examples/rdf/bibref2.rdf
74

75
$ java -cp lib/procalign.jar fr.inrialpes.exmo.align.cli.EvalAlign -i fr.inrialpes.exmo.align.impl.eval.PRecEvaluator file://$CWD/examples/rdf/bibref2.rdf file://$CWD/examples/rdf/bibref.rdf
76

Jérôme Euzenat's avatar
Jérôme Euzenat committed
77
$ java -jar lib/procalign.jar file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.impl.method.StringDistAlignment -DstringFunction=levenshteinDistance -DprintMatrix=1 -o /dev/null > examples/rdf/matrix.tex
78
~~~~
79

80
## Using with JWNL (Wordnet)
81

82 83 84
Requirements:
* Wordnet should be installed its directory to be put in `$WNDIR` (3.0 and 3.1 should work)
* `jwnl.jar` `commons-logging.jar` must be in `lib` (`file_properties.xml` need not anymore to be in current directory)
85

86
~~~~
Jérôme Euzenat's avatar
Jérôme Euzenat committed
87
$ export WNDIR=../WordNet-3.1/dict
88

89
$ java -jar lib/procalign.jar -Dwndict=$WNDIR file://$CWD/examples/rdf/edu.umbc.ebiquity.publication.owl file://$CWD/examples/rdf/edu.mit.visus.bibtex.owl -i fr.inrialpes.exmo.align.ling.JWNLAlignment -o examples/rdf/JWNL.rdf
90
~~~~
91

92
## LAST RELEASE
93

94
The last release is available from: https://gitlab.inria.fr/moex/alignapi/-/releases
95
It may actually be easier to clone the git repository from there.
96

97
## DOCUMENTATION
Jérôme Euzenat's avatar
Jérôme Euzenat committed
98

99
The documentation can be found online at https://moex.gitlabpages.inria.fr/alignapi/.
100 101 102 103 104 105 106 107 108

## SOURCE REPOSITORY

See https://gitlab.inria.fr/moex/alignapi

## FILES

<ul>
<li><tt>README.md</tt>: This file</li>
Jérôme Euzenat's avatar
Jérôme Euzenat committed
109
<li><a href="LICENSE.TXT"><tt>LICENSE.TXT</tt></a>:	the terms under which the software is licensed to you.</li>
110 111 112 113 114
<li><tt>build.xml</tt>:	the Ant build file for compiling and testing</li>
<li><tt>classes/</tt>:	directory for compiling the sources</li>
<li><tt>distrib/</tt>:	some files for generating new jarfiles</li>
<li><tt>dtd/</tt>: contains the ontoalign DTDs (and schemas)</li>
<li><tt>examples/</tt>:	examples of use of the API and server</li>
Jérôme Euzenat's avatar
Jérôme Euzenat committed
115
<li><tt>html/</tt>: contains some documentation in HTML format (includes `html/relnotes.html`)</li>
116 117 118 119 120
<li><tt>html/tutorial/</tt>:  tutorial</li>
<li><tt>javadoc/</tt>:	javadoc API documentation in HTML (not very useful)</li>
<li><tt>lib/</tt>: contains align.jar, procalign.jar, alignsvc.jar
</tt>: 	 and other necessary jarfiles</li>
<li><tt>plugins/neon/</tt>:	Plug-in for the NeOn toolkit</li>
Jérôme Euzenat's avatar
Jérôme Euzenat committed
121
<li><tt>src/</tt>: Java sources of ontoalign<br />
122 123 124 125 126 127 128 129 130 131 132 133 134 135
<tt>org.semanticweb.owl.align</tt>: the API<br />
<tt>fr.inrialpes.exmo.align.impl</tt>: basic implementation<br />
<tt>fr.inrialpes.exmo.align.util</tt>: utility functions<br />
<tt>fr.inrialpes.exmo.align.cli</tt>: command line interface<br />
<tt>fr.inrialpes.exmo.align.ling</tt>: WordNet-based implementation<br />
<tt>fr.inrialpes.exmo.align.service</tt>: Alignment Service<br />
<tt>fr.inrialpes.exmo.align.parser</tt>: Alignment format parsers<br />
<tt>fr.inrialpes.exmo.align.gen</tt>: test generators<br />
<tt>fr.inrialpes.exmo.ontowrap</tt>: Abstract ontology layer</li>
<li><tt>test/</tt>: Unit tests for testng</li>
<li><tt>tools/</tt>: Compile-time tools (testng, etc.)</li>
</ul>

## RUNNING THE ALIGNMENT SERVER
136 137

For information on how to setup an alignment setver, please consult the
138
more elaborate documentation at: [`html/aserv.html`](html/aserv.html)
139

140
~~~~
141
$ java -jar lib/alignsvc.jar -H
Jérôme Euzenat's avatar
Jérôme Euzenat committed
142
$ java -jar lib/alignsvc.jar -Dwndict=../WordNet-3.1/dict -H
143
~~~~
144

145
The alignment server is then available through HTTP with: http://localhost:8089/html/
146 147

For debugging, using logback, do:
148
~~~~
Jérôme Euzenat's avatar
Jérôme Euzenat committed
149
$ java -cp lib/slf4j/logback-core-1.2.3.jar:lib/slf4j/logback-classic-1.2.3.jar:lib/alignsvc.jar -Dlogback.configurationFile=logback.xml fr.inrialpes.exmo.align.service.AlignmentService -Dwndict=../WordNet-3.1/dict -H
150
~~~~