Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
moex
Alignment API
Commits
451c1fa0
Commit
451c1fa0
authored
15 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- Parameters replaced by Properties
parent
6387b42a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/src/IOTests.java
+2
-2
2 additions, 2 deletions
test/src/IOTests.java
test/src/JWNLTest.java
+6
-7
6 additions, 7 deletions
test/src/JWNLTest.java
test/src/RendererTest.java
+9
-10
9 additions, 10 deletions
test/src/RendererTest.java
with
17 additions
and
19 deletions
test/src/IOTests.java
+
2
−
2
View file @
451c1fa0
/*
* $Id$
*
* Copyright (C) INRIA, 2008-200
9
* Copyright (C) INRIA, 2008-20
1
0
*
* 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
...
...
@@ -33,7 +33,7 @@ import org.semanticweb.owl.align.Alignment;
import
fr.inrialpes.exmo.align.parser.AlignmentParser
;
import
fr.inrialpes.exmo.align.impl.URIAlignment
;
import
fr.inrialpes.exmo.
align.
onto.Ontology
;
import
fr.inrialpes.exmo.onto
wrap
.Ontology
;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintWriter
;
...
...
This diff is collapsed.
Click to expand it.
test/src/JWNLTest.java
+
6
−
7
View file @
451c1fa0
/*
* $Id$
*
* Copyright (C) INRIA, 2008-200
9
* Copyright (C) INRIA, 2008-20
1
0
*
* 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
...
...
@@ -31,10 +31,8 @@ import org.semanticweb.owl.align.AlignmentVisitor;
import
org.semanticweb.owl.align.AlignmentException
;
import
org.semanticweb.owl.align.Alignment
;
import
org.semanticweb.owl.align.AlignmentProcess
;
import
org.semanticweb.owl.align.Parameters
;
import
fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor
;
import
fr.inrialpes.exmo.align.impl.BasicParameters
;
import
fr.inrialpes.exmo.align.ling.JWNLAlignment
;
import
fr.inrialpes.exmo.ontosim.string.JWNLDistances
;
...
...
@@ -45,6 +43,7 @@ import java.io.OutputStreamWriter;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.util.Vector
;
import
java.util.Properties
;
/**
* These tests corresponds to the JWNL test of the README file in the main directory
...
...
@@ -68,10 +67,10 @@ public class JWNLTest {
$ setenv WNDIR ../WordNet-2.0/dict
$ 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
*/
P
arameter
s
params
=
new
BasicParameter
s
();
P
ropertie
s
params
=
new
Propertie
s
();
//System.getenv("WNDIR");
//params.setP
arameter
( "wndict", "../WordNet-2.0/dict" );
params
.
setP
arameter
(
"wndict"
,
"../WordNet-3.0/dict"
);
//params.setP
roperty
( "wndict", "../WordNet-2.0/dict" );
params
.
setP
roperty
(
"wndict"
,
"../WordNet-3.0/dict"
);
alignment
=
new
JWNLAlignment
();
assertNotNull
(
alignment
,
"ObjectAlignment should not be null"
);
assertEquals
(
alignment
.
nbCells
(),
0
);
...
...
@@ -91,7 +90,7 @@ $ java -jar lib/procalign.jar -Dwndict=$WNDIR file://$CWD/examples/rdf/edu.umbc.
assertEquals
(
alignment
.
nbCells
(),
38
);
// Different similarity
params
.
setP
arameter
(
"wnfunction"
,
"cosynonymySimilarity"
);
params
.
setP
roperty
(
"wnfunction"
,
"cosynonymySimilarity"
);
alignment
=
new
JWNLAlignment
();
alignment
.
init
(
new
URI
(
"file:examples/rdf/edu.umbc.ebiquity.publication.owl"
),
new
URI
(
"file:examples/rdf/edu.mit.visus.bibtex.owl"
));
alignment
.
align
(
(
Alignment
)
null
,
params
);
...
...
This diff is collapsed.
Click to expand it.
test/src/RendererTest.java
+
9
−
10
View file @
451c1fa0
/*
* $Id$
*
* Copyright (C) INRIA, 200
9
* Copyright (C) INRIA, 20
1
0
*
* 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
...
...
@@ -33,7 +33,6 @@ import org.semanticweb.owl.align.AlignmentVisitor;
import
org.semanticweb.owl.align.AlignmentException
;
import
org.semanticweb.owl.align.AlignmentProcess
;
import
org.semanticweb.owl.align.Alignment
;
import
org.semanticweb.owl.align.Parameters
;
import
org.semanticweb.owl.align.Evaluator
;
import
fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor
;
...
...
@@ -48,7 +47,6 @@ import fr.inrialpes.exmo.align.impl.renderer.XSLTRendererVisitor;
import
fr.inrialpes.exmo.align.impl.method.StringDistAlignment
;
//import fr.inrialpes.exmo.align.impl.eval.PRecEvaluator;
import
fr.inrialpes.exmo.align.impl.BasicParameters
;
//import fr.inrialpes.exmo.align.impl.URIAlignment;
import
java.io.ByteArrayOutputStream
;
...
...
@@ -59,6 +57,7 @@ import java.io.FileOutputStream;
import
java.io.OutputStream
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.util.Properties
;
/**
* These tests corresponds to the README file in the main directory
...
...
@@ -71,8 +70,8 @@ public class RendererTest {
// Create the Alignement that will be rendered by everyone
@BeforeClass
(
groups
=
{
"full"
,
"impl"
,
"raw"
})
private
void
init
()
throws
Exception
{
P
arameter
s
params
=
new
BasicParameter
s
();
params
.
setP
arameter
(
"stringFunction"
,
"levenshteinDistance"
);
P
ropertie
s
params
=
new
Propertie
s
();
params
.
setP
roperty
(
"stringFunction"
,
"levenshteinDistance"
);
alignment
=
new
StringDistAlignment
();
assertNotNull
(
alignment
,
"ObjectAlignment should not be null"
);
assertEquals
(
alignment
.
nbCells
(),
0
);
...
...
@@ -92,8 +91,8 @@ public class RendererTest {
writer
.
flush
();
writer
.
close
();
assertEquals
(
stream
.
toString
().
length
(),
14297
,
"Rendered differently"
);
P
arameter
s
params
=
new
BasicParameter
s
();
params
.
setP
arameter
(
"embedded"
,
"1"
);
P
ropertie
s
params
=
new
Propertie
s
();
params
.
setP
roperty
(
"embedded"
,
"1"
);
}
@Test
(
groups
=
{
"full"
,
"impl"
,
"raw"
})
...
...
@@ -107,8 +106,8 @@ public class RendererTest {
writer
.
flush
();
writer
.
close
();
assertEquals
(
stream
.
toString
().
length
(),
7478
,
"Rendered differently"
);
P
arameter
s
params
=
new
BasicParameter
s
();
params
.
setP
arameter
(
"embedded"
,
"1"
);
P
ropertie
s
params
=
new
Propertie
s
();
params
.
setP
roperty
(
"embedded"
,
"1"
);
stream
=
new
ByteArrayOutputStream
();
writer
=
new
PrintWriter
(
new
BufferedWriter
(
...
...
@@ -119,7 +118,7 @@ public class RendererTest {
writer
.
flush
();
writer
.
close
();
assertEquals
(
stream
.
toString
().
length
(),
7423
,
"Rendered differently"
);
params
.
setP
arameter
(
"pre2008"
,
"1"
);
params
.
setP
roperty
(
"pre2008"
,
"1"
);
stream
=
new
ByteArrayOutputStream
();
writer
=
new
PrintWriter
(
new
BufferedWriter
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment