Alignment API and Server 4.1.${version.update}

fr.inrialpes.exmo.align.impl.aggr
Class ConsensusAggregator

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.BasicAlignment
      extended by fr.inrialpes.exmo.align.impl.aggr.ConsensusAggregator
All Implemented Interfaces:
Cloneable, Iterable<Cell>, Alignment, Visitable

public class ConsensusAggregator
extends BasicAlignment

Version:
$Id$ 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

Nested Class Summary
private  class ConsensusAggregator.CountCell
           
 
Field Summary
(package private)  Hashtable<Cell,ConsensusAggregator.CountCell> count
           
(package private)  int nbAlignments
           
 
Fields inherited from class fr.inrialpes.exmo.align.impl.BasicAlignment
debug, extensions, hash1, hash2, level, namespaces, onto1, onto2, time, type
 
Constructor Summary
ConsensusAggregator()
          Creation
 
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, cleanUp, clone, compose, 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, meet, nbCells, remCell, removeAlignCell, render, setExtension, setExtensions, setFile1, setFile2, setLevel, setOntology1, setOntology2, setType, setXNamespace, toURIAlignment
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nbAlignments

int nbAlignments

count

Hashtable<Cell,ConsensusAggregator.CountCell> count
Constructor Detail

ConsensusAggregator

public ConsensusAggregator()
Creation

Method Detail

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.


Alignment API and Server 4.1.${version.update}

(C) INRIA & friends, 2003-${curryear}