Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 88a23523 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- replaced BasicParameters by Properties

parent a84f9ce0
Branches
Tags
No related merge requests found
/* /*
* $Id$ * $Id$
* *
* Copyright (C) INRIA, 2006-2010 * Copyright (C) INRIA, 2006-2010, 2012
* *
* Modifications to the initial code base are copyright of their * Modifications to the initial code base are copyright of their
* respective authors, or their employers as appropriate. Authorship * respective authors, or their employers as appropriate. Authorship
...@@ -32,7 +32,6 @@ import org.semanticweb.owl.align.Evaluator; ...@@ -32,7 +32,6 @@ import org.semanticweb.owl.align.Evaluator;
// Alignment API implementation classes // Alignment API implementation classes
import fr.inrialpes.exmo.align.impl.BasicAlignment; import fr.inrialpes.exmo.align.impl.BasicAlignment;
import fr.inrialpes.exmo.align.impl.BasicParameters;
import fr.inrialpes.exmo.align.impl.method.StringDistAlignment; import fr.inrialpes.exmo.align.impl.method.StringDistAlignment;
import fr.inrialpes.exmo.align.impl.renderer.OWLAxiomsRendererVisitor; import fr.inrialpes.exmo.align.impl.renderer.OWLAxiomsRendererVisitor;
import fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor; import fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor;
...@@ -65,7 +64,7 @@ public class MyApp { ...@@ -65,7 +64,7 @@ public class MyApp {
public static void main( String[] args ) { public static void main( String[] args ) {
URI onto1 = null; URI onto1 = null;
URI onto2 = null; URI onto2 = null;
Properties params = new BasicParameters(); Properties params = new Properties();
int question = 1; int question = 1;
try { try {
...@@ -86,7 +85,7 @@ public class MyApp { ...@@ -86,7 +85,7 @@ public class MyApp {
a1.align( (Alignment)null, params ); a1.align( (Alignment)null, params );
AlignmentProcess a2 = new StringDistAlignment(); AlignmentProcess a2 = new StringDistAlignment();
a2.init ( onto1, onto2 ); a2.init ( onto1, onto2 );
params = new BasicParameters(); params = new Properties();
params.setProperty("stringFunction","ngramDistance"); params.setProperty("stringFunction","ngramDistance");
a2.align( (Alignment)null, params ); a2.align( (Alignment)null, params );
...@@ -121,7 +120,7 @@ public class MyApp { ...@@ -121,7 +120,7 @@ public class MyApp {
double best = 0.; double best = 0.;
Alignment result = null; Alignment result = null;
Properties p = new BasicParameters(); Properties p = new Properties();
for ( int i = 0; i <= 10 ; i += 2 ){ for ( int i = 0; i <= 10 ; i += 2 ){
a1.cut( ((double)i)/10 ); a1.cut( ((double)i)/10 );
// This operation must be repeated because the modifications in a1 // This operation must be repeated because the modifications in a1
......
...@@ -93,7 +93,7 @@ the <tt>StringDistAlignment</tt> matcher: ...@@ -93,7 +93,7 @@ the <tt>StringDistAlignment</tt> matcher:
<div class="java"> <div class="java">
AlignmentProcess a = new StringDistAlignment(); AlignmentProcess a = new StringDistAlignment();
a.init ( onto1, onto2 ); a.init ( onto1, onto2 );
a.align( (Alignment)null, new BasicParameters() ); a.align( (Alignment)null, new Properties() );
</div> </div>
</p> </p>
...@@ -108,7 +108,7 @@ parameters corresponding to "smoaDistance" and "ngramDistance". ...@@ -108,7 +108,7 @@ parameters corresponding to "smoaDistance" and "ngramDistance".
</div> </div>
<div class="explain" id="qu1"> <div class="explain" id="qu1">
<div class="java"> <div class="java">
Properties params = new BasicParameters(); Properties params = new Properties();
// Run two different alignment methods (e.g., ngram distance and smoa) // Run two different alignment methods (e.g., ngram distance and smoa)
AlignmentProcess a1 = new StringDistAlignment(); AlignmentProcess a1 = new StringDistAlignment();
params.setProperty("stringFunction","smoaDistance"); params.setProperty("stringFunction","smoaDistance");
...@@ -116,7 +116,7 @@ parameters corresponding to "smoaDistance" and "ngramDistance". ...@@ -116,7 +116,7 @@ parameters corresponding to "smoaDistance" and "ngramDistance".
a1.align( (Alignment)null, params ); a1.align( (Alignment)null, params );
AlignmentProcess a2 = new StringDistAlignment(); AlignmentProcess a2 = new StringDistAlignment();
a2.init ( onto1, onto2 ); a2.init ( onto1, onto2 );
params = new BasicParameters(); params = new Properties();
params.setProperty("stringFunction","ngramDistance"); params.setProperty("stringFunction","ngramDistance");
a2.align( (Alignment)null, params ); a2.align( (Alignment)null, params );
</div> </div>
...@@ -226,7 +226,7 @@ F-measure. ...@@ -226,7 +226,7 @@ F-measure.
// and choose the one with the best F-Measure // and choose the one with the best F-Measure
double best = 0.; double best = 0.;
Alignment result = null; Alignment result = null;
Properties p = new BasicParameters(); Properties p = new Properties();
for ( int i = 0; i <= 10 ; i += 2 ){ for ( int i = 0; i <= 10 ; i += 2 ){
a1.cut( ((double)i)/10 ); a1.cut( ((double)i)/10 );
// This operation must be repeated because the modifications in a1 // This operation must be repeated because the modifications in a1
...@@ -293,7 +293,7 @@ alignment selected at the previous exercise as a set of OWL axioms. ...@@ -293,7 +293,7 @@ alignment selected at the previous exercise as a set of OWL axioms.
a1.align( (Alignment)null, params ); a1.align( (Alignment)null, params );
AlignmentProcess a2 = new StringDistAlignment(); AlignmentProcess a2 = new StringDistAlignment();
a2.init ( onto1, onto2 ); a2.init ( onto1, onto2 );
params = new BasicParameters(); params = new Properties();
params.setProperty("stringFunction","ngramDistance"); params.setProperty("stringFunction","ngramDistance");
a2.align( (Alignment)null, params ); a2.align( (Alignment)null, params );
...@@ -311,7 +311,7 @@ alignment selected at the previous exercise as a set of OWL axioms. ...@@ -311,7 +311,7 @@ alignment selected at the previous exercise as a set of OWL axioms.
// and choose the one with the best F-Measure // and choose the one with the best F-Measure
double best = 0.; double best = 0.;
Alignment result = null; Alignment result = null;
Properties p = new BasicParameters(); Properties p = new Properties();
for ( int i = 0; i <= 10 ; i += 2 ){ for ( int i = 0; i <= 10 ; i += 2 ){
a1.cut( ((double)i)/10 ); a1.cut( ((double)i)/10 );
// This operation must be repeated because the modifications in a1 // This operation must be repeated because the modifications in a1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment