INRIA & friends

fr.inrialpes.exmo.align.impl
Class DistanceAlignment

java.lang.Object
  extended byfr.inrialpes.exmo.align.impl.BasicAlignment
      extended byfr.inrialpes.exmo.align.impl.DistanceAlignment
All Implemented Interfaces:
Alignment, AlignmentProcess
Direct Known Subclasses:
ClassStructAlignment, EditDistNameAlignment, JWNLAlignment, NameAndPropertyAlignment, NameEqAlignment, SMOANameAlignment, StringDistAlignment, StrucSubsDistAlignment, SubsDistNameAlignment

public class DistanceAlignment
extends BasicAlignment
implements AlignmentProcess

Represents an OWL ontology alignment. An ontology comprises a number of collections. Each ontology has a number of classes, properties and individuals, along with a number of axioms asserting information about those objects.

Version:
$Id: DistanceAlignment.java 239 2006-05-19 19:16:21Z euzenat $
Author:
Jérôme Euzenat

Field Summary
(package private)  Similarity sim
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicAlignment
debug, extensions, hash1, hash2, level, onto1, onto2, time, type, uri1, uri2
 
Constructor Summary
DistanceAlignment(OWLOntology onto1, OWLOntology onto2)
          Creation
 
Method Summary
 void addAlignDistanceCell(java.lang.Object ob1, java.lang.Object ob2, java.lang.String relation, double measure)
           
 void align(Alignment alignment, Parameters params)
          Process matching - create distance data structures, - compute distance or similarity - extract alignment
 Alignment extract(java.lang.String type, Parameters params)
          Extract the alignment form the Similarity There are theoretically 16 types of extractors composing the characteristics [q]estion mark = ?, one or zero relation [s]tar = *, one, zero or many relations [1] = 1, exactly one relation [p]lus = +, one or many relations for each place of the relation.
 Alignment extractqq(double threshold, Parameters params)
          Extract the alignment of a ?? type exact algorithm using the Hungarian method
 Alignment extractqqNaive(double threshold, Parameters params)
          Naive algorithm: 1) dump the part of the matrix distance above threshold in a sorted set 2) traverse the sorted set and each time a correspondence involving two entities that have no correspondence is encountered, add it to the alignment.
 Alignment extractqs(double threshold, Parameters params)
          Extract the alignment of a ?* type Complexity: O(n^2)
 double getAlignedDistance1(java.lang.Object ob)
           
 double getAlignedDistance2(java.lang.Object ob)
           
 Similarity getSimilarity()
           
 void printDistanceMatrix(Parameters params)
           
 void setSimilarity(Similarity s)
           
 
Methods inherited from class fr.inrialpes.exmo.align.impl.BasicAlignment
accept, addAlignCell, addAlignCell, addCell, compose, cut, cut, cut2, dump, getAlignCell1, getAlignCell2, getAlignCells1, getAlignCells2, getAlignedObject1, getAlignedObject2, getAlignedRelation1, getAlignedRelation2, getAlignedStrength1, getAlignedStrength2, getArrayElements, getElements, getExtension, getExtensions, getFile1, getFile2, getLevel, getOntology1, getOntology2, getType, harden, ingest, init, inverse, join, meet, nbCells, removeAlignCell, render, setExtension, setFile1, setFile2, setLevel, setOntology1, setOntology2, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owl.align.Alignment
accept, addAlignCell, addAlignCell, compose, cut, cut, dump, getAlignCell1, getAlignCell2, getAlignCells1, getAlignCells2, getAlignedObject1, getAlignedObject2, getAlignedRelation1, getAlignedRelation2, getAlignedStrength1, getAlignedStrength2, getElements, getExtension, getExtensions, getFile1, getFile2, getLevel, getOntology1, getOntology2, getType, harden, inverse, join, meet, nbCells, render, setExtension, setFile1, setFile2, setLevel, setOntology1, setOntology2, setType
 

Field Detail

sim

Similarity sim
Constructor Detail

DistanceAlignment

public DistanceAlignment(OWLOntology onto1,
                         OWLOntology onto2)
Creation

Method Detail

setSimilarity

public void setSimilarity(Similarity s)

getSimilarity

public Similarity getSimilarity()

addAlignDistanceCell

public void addAlignDistanceCell(java.lang.Object ob1,
                                 java.lang.Object ob2,
                                 java.lang.String relation,
                                 double measure)
                          throws AlignmentException
Throws:
AlignmentException

getAlignedDistance1

public double getAlignedDistance1(java.lang.Object ob)
                           throws AlignmentException
Throws:
AlignmentException

getAlignedDistance2

public double getAlignedDistance2(java.lang.Object ob)
                           throws AlignmentException
Throws:
AlignmentException

align

public void align(Alignment alignment,
                  Parameters params)
           throws AlignmentException,
                  OWLException
Process matching - create distance data structures, - compute distance or similarity - extract alignment

Specified by:
align in interface AlignmentProcess
Throws:
AlignmentException
OWLException

printDistanceMatrix

public void printDistanceMatrix(Parameters params)

extract

public Alignment extract(java.lang.String type,
                         Parameters params)
                  throws AlignmentException
Extract the alignment form the Similarity There are theoretically 16 types of extractors composing the characteristics [q]estion mark = ?, one or zero relation [s]tar = *, one, zero or many relations [1] = 1, exactly one relation [p]lus = +, one or many relations for each place of the relation. Howerver, since it is not possible from a matrics to guarantee that one object will be in at least one relation, this is restricted to the four following types: ?? (covering 11, 1? and ?1) ** (covering ++, *+ and +*) ?* (covering 1*, 1+ and ?+) *? (covering +?, *1 and +1)

Throws:
AlignmentException

extractqs

public Alignment extractqs(double threshold,
                           Parameters params)
Extract the alignment of a ?* type Complexity: O(n^2)


extractqq

public Alignment extractqq(double threshold,
                           Parameters params)
Extract the alignment of a ?? type exact algorithm using the Hungarian method


extractqqNaive

public Alignment extractqqNaive(double threshold,
                                Parameters params)
Naive algorithm: 1) dump the part of the matrix distance above threshold in a sorted set 2) traverse the sorted set and each time a correspondence involving two entities that have no correspondence is encountered, add it to the alignment. Complexity: O(n^2.logn) Pitfall: no global optimality is warranted for instance if there is the following matrix: (a,a')=1., (a,b')=.9, (b,a')=.9, (b,b')=.1 This algorithm will select the first and last correspondances of overall similarity 1.1, while the optimum is the second solution with overall of 1.8.


INRIA & friends

..no bottom yet...