Bonjours tous,


je suis en train de faire d’alignement d'ontologies à base d'instances , en phase d'alignement j'arrive pas à transformer les inputs (ontologies et les instances y inclues) en forme d' URI
pour se faire j'ai utilisé les commandes suivantes incluses dans ce code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
public class aling {
 
    public static void main( String[] args ) {
	URI onto1 = null;
	URI onto2 = null;
	Properties params = new BasicParameters();
	  final String inputFileName = "a.owl";
      final String inputFileName1 = "b.owl";
      OntModel inf = ModelFactory.createOntologyModel();
      OntModel inf1 = ModelFactory.createOntologyModel();
      InputStream in = FileManager.get().open(inputFileName);
      InputStream in1 = FileManager.get().open(inputFileName1);
 
 
	try {
	    // Loading ontologies
	    if (args.length >= 2) {
	    /*	Iterator iter=ontologie.listOntologies();
	    	while(iter.hasNext())
	    	{
	    	    OntologyImpl onto=(OntologyImpl)iter.next();
	    	    String ontologieURI=(onto.getURI());
	    	    System.out.println(ontologieURI);*/
 
	    	/*URI url1 = getOntology1URI();
	    	URI url2 = getOntology2URI();
		    URI uri2 = getObject2AsURI("a.owl"); */
 
	    //	IRI ontoIRI = ontology.getOntologyID().getOntologyIRI();
	    URI uri1 = new URI("file:../a.owl");
	    URI uri2 = new URI("file:../b.owl");
 
	    Parameters p = new BasicParameters();
 
		/*onto1 = new URI( a.owl );
		onto2 = new URI( args[1] ); */
	    } else 
	    {
		System.err.println("Need two arguments to proceed");
		return ;
	    }
 
	    // Aligning
	    AlignmentProcess a1 = new StringDistAlignment();
	    a1.init ( onto1, onto2 );
	    a1.align( (Alignment)null, params );
 
	    // Outputing
	    PrintWriter writer = new PrintWriter (new BufferedWriter(new OutputStreamWriter( System.out, "UTF-8" )), true);
	    AlignmentVisitor renderer = new RDFRendererVisitor(writer);
	    a1.render(renderer);
	    writer.flush();
	    writer.close();
 
	} catch (Exception e) { e.printStackTrace(); };
    }
}
merci d'avance de me proposer une solution