OntoSim 2.1

fr.inrialpes.exmo.ontosim
Class VectorSpaceMeasure

java.lang.Object
  extended by fr.inrialpes.exmo.ontosim.VectorSpaceMeasure
All Implemented Interfaces:
Measure<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>>

public class VectorSpaceMeasure
extends Object
implements Measure<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>>


Nested Class Summary
 
Nested classes/interfaces inherited from interface fr.inrialpes.exmo.ontosim.Measure
Measure.TYPES
 
Field Summary
private  org.apache.lucene.analysis.Analyzer analyzer
           
protected  VectorMeasure measure
           
private  DocumentCollection ontIndex
           
protected  Map<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>,Document> ontologies
           
protected  DocumentCollection.WEIGHT vectorType
           
 
Constructor Summary
VectorSpaceMeasure()
           
VectorSpaceMeasure(Collection<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>> ontologies)
           
VectorSpaceMeasure(Collection<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>> ontologies, VectorMeasure m, DocumentCollection.WEIGHT vectorType)
           
VectorSpaceMeasure(VectorMeasure m, DocumentCollection.WEIGHT vectorType)
           
 
Method Summary
 void addOntologies(Collection<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>> ontologies)
           
 boolean addOntology(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> ontology)
           
protected  void analyseString(String toAnalyse, Collection<String> words)
          add all words contained in toAnalyse into words collection.
 double getDissim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1, fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2)
           
 double getDissim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1, fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2, VectorMeasure m, DocumentCollection.WEIGHT vectorType)
           
 double getMeasureValue(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1, fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2)
           
 Measure.TYPES getMType()
           
 double getSim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1, fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2)
           
 double getSim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1, fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2, VectorMeasure m, DocumentCollection.WEIGHT vectorType)
           
 DocumentCollection.WEIGHT getVectorType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

analyzer

private org.apache.lucene.analysis.Analyzer analyzer

ontologies

protected Map<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>,Document> ontologies

ontIndex

private DocumentCollection ontIndex

vectorType

protected DocumentCollection.WEIGHT vectorType

measure

protected VectorMeasure measure
Constructor Detail

VectorSpaceMeasure

public VectorSpaceMeasure()

VectorSpaceMeasure

public VectorSpaceMeasure(Collection<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>> ontologies)

VectorSpaceMeasure

public VectorSpaceMeasure(VectorMeasure m,
                          DocumentCollection.WEIGHT vectorType)

VectorSpaceMeasure

public VectorSpaceMeasure(Collection<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>> ontologies,
                          VectorMeasure m,
                          DocumentCollection.WEIGHT vectorType)
Method Detail

addOntology

public final boolean addOntology(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> ontology)

addOntologies

public final void addOntologies(Collection<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>> ontologies)

analyseString

protected void analyseString(String toAnalyse,
                             Collection<String> words)
add all words contained in toAnalyse into words collection. Words are stemmed.

Parameters:
toAnalyse - : the string to be analysed
words - : the collection to add extracted words

getSim

public double getSim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1,
                     fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2,
                     VectorMeasure m,
                     DocumentCollection.WEIGHT vectorType)

getDissim

public double getDissim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1,
                        fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2,
                        VectorMeasure m,
                        DocumentCollection.WEIGHT vectorType)

getSim

public double getSim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1,
                     fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2)
Specified by:
getSim in interface Measure<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>>

getDissim

public double getDissim(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1,
                        fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2)
Specified by:
getDissim in interface Measure<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>>

getMeasureValue

public double getMeasureValue(fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o1,
                              fr.inrialpes.exmo.ontowrap.LoadedOntology<?> o2)
Specified by:
getMeasureValue in interface Measure<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>>

getMType

public Measure.TYPES getMType()
Specified by:
getMType in interface Measure<fr.inrialpes.exmo.ontowrap.LoadedOntology<?>>

getVectorType

public DocumentCollection.WEIGHT getVectorType()

OntoSim 2.1

(C) INRIA & friends, 2008-2009