public abstract class DistanceAlignment extends ObjectAlignment implements AlignmentProcess
Modifier and Type | Field and Description |
---|---|
(package private) static org.slf4j.Logger |
logger |
(package private) Similarity |
sim |
init
confidenceType, extensions, hash1, hash2, level, namespaces, onto1, onto2, relationCreationMethod, relationType, time, type
Constructor and Description |
---|
DistanceAlignment()
Creation
|
Modifier and Type | Method and Description |
---|---|
void |
align(Alignment alignment,
java.util.Properties params)
Process matching
- create distance data structures,
- compute distance or similarity
- extract alignment
|
int[][] |
callHungarianMethod(double[][] matrix,
int i,
int j) |
void |
cleanUp()
Suppresses the distance matrix
|
Alignment |
extract(java.lang.String type,
java.util.Properties params)
Extract the alignment form the Similarity
|
Alignment |
extractqq(double threshold,
java.util.Properties params)
Extract the alignment of a ?? type
exact algorithm using the Hungarian method.
|
Alignment |
extractqqgreedy(double threshold,
java.util.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,
java.util.Properties params) |
Alignment |
extractsq(double threshold,
java.util.Properties params)
Extract the alignment of a ?* type
Non symmetric: for each entity of onto1, take the highest if superior to threshold
Complexity: O(n^2)
|
Alignment |
extractss(double threshold,
java.util.Properties params)
Extract the alignment of a ** type
Symmetric: return all elements above threshold
Complexity: O(n^2)
|
Similarity |
getSimilarity() |
void |
printDistanceMatrix(java.util.Properties params)
Prints the distance matrix
|
void |
setSimilarity(Similarity s) |
createCell, createNewAlignment, getOntology1URI, getOntology2URI, getOntologyObject1, getOntologyObject2, init, inverse, loadInit, loadOntology, ontology1, ontology2, toObjectAlignment, toURIAlignment, toURIAlignment
accept, addAlignCell, addAlignCell, addAlignCell, addAlignCell, addAlignCell, addCell, aggregate, avgConfidence, clone, compose, contains, createRelation, cut, cut, cut2, deleteAllCells, diff, dump, equals, getAlignCell1, getAlignCell2, getAlignCells, getAlignCells1, getAlignCells2, getAlignedObject1, getAlignedObject2, getAlignedRelation1, getAlignedRelation2, getAlignedStrength1, getAlignedStrength2, getArrayElements, getConfidenceType, getElements, getExtension, getExtensions, getExtensionsObject, getFile1, getFile2, getLevel, getOntology1, getOntology2, getParameters, getRelationType, getSortedIterator, getType, getXNamespace, getXNamespaces, harden, hashCode, ingest, init, init, invertContent, invertType, iterator, join, maxConfidence, meet, minConfidence, nbCells, normalise, remCell, removeAlignCell, render, rewriteQuery, rewriteQuery, rewriteSPARQLQuery, rewriteSPARQLQuery, setConfidenceType, setExtension, setExtensions, setFile1, setFile2, setLevel, setOntology1, setOntology2, setRelationType, setType, setXNamespace, translateMessage, varianceConfidence
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
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
static final org.slf4j.Logger logger
Similarity sim
public void setSimilarity(Similarity s)
public Similarity getSimilarity()
public void align(Alignment alignment, java.util.Properties params) throws AlignmentException
align
in interface AlignmentProcess
AlignmentException
- when something goes wrongpublic void printDistanceMatrix(java.util.Properties params)
params:
- the parameters of the distancepublic void cleanUp()
cleanUp
in class BasicAlignment
public Alignment extract(java.lang.String type, java.util.Properties params) throws AlignmentException
type:
- the type of alignment to extract:
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)params:
- the parameter of the measureAlignmentException
- when something goes wrongpublic Alignment extractsq(double threshold, java.util.Properties params)
threshold:
- the threshold to apply to extracted correspondencesparams:
- the parameter of the measurepublic Alignment extractqs(double threshold, java.util.Properties params)
public Alignment extractss(double threshold, java.util.Properties params)
threshold:
- the threshold to apply to extracted correspondencesparams:
- the parameter of the measurepublic Alignment extractqq(double threshold, java.util.Properties params)
threshold:
- the threshold to apply to extracted correspondencesparams:
- the parameter of the measurepublic int[][] callHungarianMethod(double[][] matrix, int i, int j)
public Alignment extractqqgreedy(double threshold, java.util.Properties params)
threshold:
- the threshold to apply to extracted correspondencesparams:
- the parameter of the measure(C) INRIA & friends, 2003-2020