DistanceAlignment (Alignment API and Server)
Date: 2010-03-31

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Alignment API and Server 4.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.inrialpes.exmo.align.impl
Class DistanceAlignment

    java.lang.Object
      fr.inrialpes.exmo.align.impl.BasicAlignment
          fr.inrialpes.exmo.align.impl.ObjectAlignment
              fr.inrialpes.exmo.align.impl.DistanceAlignment

All Implemented Interfaces:
  Cloneable, Iterable<Cell>, Alignment, AlignmentProcess, Visitable

Direct Known Subclasses:
  ClassStructAlignment, JWNLAlignment, NameAndPropertyAlignment, StringDistAlignment, StrucSubsDistAlignment

    public class DistanceAlignment

extends ObjectAlignment
implements AlignmentProcess

Version:
  $Id: DistanceAlignment.java 1370 2010-03-26 22:20:30Z euzenat $
Author:
  Jérôme Euzenat

Field Summary
`(package private) Similarity` | `sim`

Fields inherited from class fr.inrialpes.exmo.align.impl.ObjectAlignment
`init`

Fields inherited from class fr.inrialpes.exmo.align.impl.BasicAlignment
`debug, extensions, hash1, hash2, level, namespaces, onto1, onto2, time, type`

Constructor Summary
`DistanceAlignment()` Creation

Method Summary
`void` | `addAlignDistanceCell(Object ob1, Object ob2, String relation, double measure)`
`void` | `align(Alignment alignment, Properties params)` Process matching - create distance data structures, - compute distance or similarity - extract alignment
`void` | `cleanUp()` Suppresses the distance matrix
`Alignment` | `extract(String type, Properties 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, Properties params)` Extract the alignment of a ?? type exact algorithm using the Hungarian method
`Alignment` | `extractqqgreedy(double threshold, Properties params)` Greedy 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, Properties params)` Extract the alignment of a ?* type Complexity: O(n^2)
`double` | `getAlignedDistance1(Object ob)`
`double` | `getAlignedDistance2(Object ob)`
`Similarity` | `getSimilarity()`
`void` | `printDistanceMatrix(Properties params)` Prints the distance matrix
`void` | `setSimilarity(Similarity s)`

Methods inherited from class fr.inrialpes.exmo.align.impl.ObjectAlignment
`createCell, createNewAlignment, getOntology1URI, getOntology2URI, init, loadInit, loadOntology, ontology1, ontology2, toObjectAlignment, toURIAlignment`

Methods inherited from class fr.inrialpes.exmo.align.impl.BasicAlignment
`accept, addAlignCell, addAlignCell, addAlignCell, addAlignCell, addCell, clone, compose, cut, cut, cut2, diff, dump, getAlignCell1, getAlignCell2, getAlignCells1, getAlignCells2, getAlignedObject1, getAlignedObject2, getAlignedRelation1, getAlignedRelation2, getAlignedStrength1, getAlignedStrength2, getArrayElements, getElements, getExtension, getExtensions, getFile1, getFile2, getLevel, getOntology1, getOntology2, getOntologyObject1, getOntologyObject2, getParameters, getType, getXNamespace, getXNamespaces, harden, ingest, init, inverse, iterator, join, meet, nbCells, remCell, removeAlignCell, render, setExtension, setExtensions, setFile1, setFile2, setLevel, setOntology1, setOntology2, setType, setXNamespace`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.semanticweb.owl.align.Alignment
`addAlignCell, addAlignCell, clone, compose, cut, cut, diff, dump, getAlignCell1, getAlignCell2, getAlignCells1, getAlignCells2, getAlignedObject1, getAlignedObject2, getAlignedRelation1, getAlignedRelation2, getAlignedStrength1, getAlignedStrength2, getElements, getExtension, getExtensions, getFile1, getFile2, getLevel, getOntology1, getOntology1URI, getOntology2, getOntology2URI, getType, harden, init, init, inverse, iterator, join, meet, nbCells, remCell, render, setExtension, setFile1, setFile2, setLevel, setOntology1, setOntology2, setType`

Methods inherited from interface org.semanticweb.owl.align.Visitable
`accept`

Field Detail

### sim

    Similarity sim

Constructor Detail

### DistanceAlignment

    public DistanceAlignment()

  Creation

Method Detail

### setSimilarity

    public void setSimilarity(Similarity s)

### getSimilarity

    public Similarity getSimilarity()

### addAlignDistanceCell

    public void addAlignDistanceCell(Object ob1,
                                     Object ob2,
                                     String relation,
                                     double measure)
                              throws AlignmentException

  Throws:
    `AlignmentException`

### getAlignedDistance1

    public double getAlignedDistance1(Object ob)
                               throws AlignmentException

  Throws:
    `AlignmentException`

### getAlignedDistance2

    public double getAlignedDistance2(Object ob)
                               throws AlignmentException

  Throws:
    `AlignmentException`

### align

    public void align(Alignment alignment,
                      Properties params)
               throws AlignmentException

  Process matching - create distance data structures, - compute distance or similarity - extract alignment

  Specified by:
    `align` in interface `AlignmentProcess`
  Throws:
    `AlignmentException`

### printDistanceMatrix

    public void printDistanceMatrix(Properties params)

  Prints the distance matrix

### cleanUp

    public void cleanUp()

  Suppresses the distance matrix

  Overrides:
    `cleanUp` in class `BasicAlignment`

### extract

    public Alignment extract(String type,
                             Properties 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,
                               Properties params)

  Extract the alignment of a ?* type Complexity: O(n^2)

### extractqq

    public Alignment extractqq(double threshold,
                               Properties params)

  Extract the alignment of a ?? type exact algorithm using the Hungarian method

### extractqqgreedy

    public Alignment extractqqgreedy(double threshold,
                                     Properties params)

  Greedy 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, nor stable marriage 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Alignment API and Server 4.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) INRIA & friends, 2003-2010