fr.inrialpes.exmo.align.impl.aggr
Class ConsensusAggregator
java.lang.Object
fr.inrialpes.exmo.align.impl.BasicAlignment
fr.inrialpes.exmo.align.impl.aggr.ConsensusAggregator
- All Implemented Interfaces:
- Cloneable, Iterable<Cell>, Alignment, Visitable
public class ConsensusAggregator
- extends BasicAlignment
- Version:
- $Id: ConsensusAggregator.java 1608 2011-05-28 20:21:16Z euzenat $
This class is a generalisation of a consensus aggregation.
It is fed by "ingesting" various alignments, i.e., collecting and counting their correspondences
Then the extraction of an alignement is made by extracting an alignment
So the aggregator works with the following interface:
aggr = new ConsensusAggregator();
aggr.ingest( Alignment );
aggr.ingest( Alignment );
...
aggr.extract( double, boolean )
or
aggr.extract( int, boolean )
for the interpretation of these two primitives, see the definition of extract.
There could be also a possibility to introduce a hook depending on the entities to be compared.
For instance, in multilingual matching, if the labels are one word, then n=5, if they are more than one word, n=2
- Author:
- Jérôme Euzenat
Method Summary |
void |
extract(double minVal,
boolean absolute)
Extract the alignment from consensus
If absolute, then retain correspondences scoring more than n
Otherwise, retain those scoring more than n in average, i.e., n*nbAlignments |
void |
extract(int minVal,
boolean absolute)
Extract the alignment from consensus
If absolute, then retain correspondences found in more than n alignments
Otherwise, retain those found in more than n% of alignments |
void |
ingest(Alignment al)
Extract the alignment from consensus |
Cell |
isAlreadyThere(Cell c)
Find the relation if it already exists. |
Methods inherited from class fr.inrialpes.exmo.align.impl.BasicAlignment |
accept, addAlignCell, addAlignCell, addAlignCell, addAlignCell, addCell, avgConfidence, cleanUp, clone, compose, convertExtension, createCell, createNewAlignment, cut, cut, cut2, diff, dump, getAlignCell1, getAlignCell2, getAlignCells1, getAlignCells2, getAlignedObject1, getAlignedObject2, getAlignedRelation1, getAlignedRelation2, getAlignedStrength1, getAlignedStrength2, getArrayElements, getElements, getExtension, getExtensions, getFile1, getFile2, getLevel, getOntology1, getOntology1URI, getOntology2, getOntology2URI, getOntologyObject1, getOntologyObject2, getParameters, getType, getXNamespace, getXNamespaces, harden, init, init, inverse, iterator, join, maxConfidence, meet, minConfidence, nbCells, remCell, removeAlignCell, render, setExtension, setExtensions, setFile1, setFile2, setLevel, setOntology1, setOntology2, setType, setXNamespace, toURIAlignment, varianceConfidence |
nbAlignments
int nbAlignments
count
Hashtable<Cell,ConsensusAggregator.CountCell> count
ConsensusAggregator
public ConsensusAggregator()
- Creation
ingest
public void ingest(Alignment al)
throws AlignmentException
- Extract the alignment from consensus
- Overrides:
ingest
in class BasicAlignment
- Throws:
AlignmentException
extract
public void extract(int minVal,
boolean absolute)
throws AlignmentException
- Extract the alignment from consensus
If absolute, then retain correspondences found in more than n alignments
Otherwise, retain those found in more than n% of alignments
- Throws:
AlignmentException
extract
public void extract(double minVal,
boolean absolute)
throws AlignmentException
- Extract the alignment from consensus
If absolute, then retain correspondences scoring more than n
Otherwise, retain those scoring more than n in average, i.e., n*nbAlignments
- Throws:
AlignmentException
isAlreadyThere
public Cell isAlreadyThere(Cell c)
- Find the relation if it already exists.
NOTE: It may be worth to consider that the relations do not have to
be equal but could be more specific or general than one another.
This could typically be made with algebras of relations.
(C) INRIA & friends, 2003-${curryear}