gr.demokritos.iit.conceptualIndex.documentModel
Class SemanticIndex

java.lang.Object
  extended by gr.demokritos.iit.conceptualIndex.documentModel.SemanticIndex

public class SemanticIndex
extends java.lang.Object

Represents an index of semantic information, connected to a SymbolicGraph. Each symbol of the SymbolicGraph can be assigned a semantics. Connected symbols in the SymbolicGraph, are considered to indicate inheritance of semantics. Therefore, the SemanticIndex takes into account such inheritance and can be used to retrieve the semantics of every symbol in the graph.


Field Summary
 IMeaningExtractor MeaningExtractor
          A meaning extractor, that is null by default, leading meaning lookups to the InternetWordNetMeaningExtractor.
 
Constructor Summary
SemanticIndex(SymbolicGraph sgGraph)
          Creates a new instance of SemanticIndex, given a SymbolicGraph .
 
Method Summary
 GraphSimilarity compareMeaningsOf(salvo.jesus.graph.Vertex vNode1, salvo.jesus.graph.Vertex vNode2)
          TODO: Implement Determines the similarity between two nodes of this graph.
static double compareWordDefinitions(WordDefinition wd1, WordDefinition wd2)
          Computes the similarity between two word definitions, represented as WordDefinition objects.
 WordDefinition getMeaning(java.lang.String sString)
          Locates and returns the meaning of a string within this graph.
 WordDefinition getMeaning(salvo.jesus.graph.Vertex vNode)
          Locates and returns the meaning of vertex' label within this graph.
static void main(java.lang.String[] args)
          Test function.
static java.lang.String meaningToString(java.lang.Object oWd)
          Converts a word definition to its string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MeaningExtractor

public IMeaningExtractor MeaningExtractor
A meaning extractor, that is null by default, leading meaning lookups to the InternetWordNetMeaningExtractor. If not null, then the assigned meaning extractor is used to get meanings.

See Also:
InternetWordNetMeaningExtractor, LocalWordNetMeaningExtractor, IMeaningExtractor
Constructor Detail

SemanticIndex

public SemanticIndex(SymbolicGraph sgGraph)
Creates a new instance of SemanticIndex, given a SymbolicGraph .

Parameters:
sgGraph - The graph of symbols to use, in order to initialize the semantic index.
See Also:
SymbolicGraph
Method Detail

getMeaning

public WordDefinition getMeaning(java.lang.String sString)
Locates and returns the meaning of a string within this graph.

Parameters:
sString - The string to look up.
Returns:
The definition of the string as a WordDefinition object.

getMeaning

public WordDefinition getMeaning(salvo.jesus.graph.Vertex vNode)
Locates and returns the meaning of vertex' label within this graph.

Parameters:
vNode - The vertex, the label of which is looked up.
Returns:
The definition of the vertex label as a WordDefinition object.

compareMeaningsOf

public GraphSimilarity compareMeaningsOf(salvo.jesus.graph.Vertex vNode1,
                                         salvo.jesus.graph.Vertex vNode2)
TODO: Implement Determines the similarity between two nodes of this graph.

Parameters:
vNode1 - The first node used to perform the comparison.
vNode2 - The second node used to perform the comparison.
Returns:
The similarity of the two nodes as a object.
See Also:
GraphSimilarity

compareWordDefinitions

public static double compareWordDefinitions(WordDefinition wd1,
                                            WordDefinition wd2)
Computes the similarity between two word definitions, represented as WordDefinition objects.

Parameters:
wd1 - The first word definition.
wd2 - The second word definition.
Returns:
The degree of similarity between wd1,wd2 as a double. A value of 1.0 indicates complete match (that is to say the definitions are equivalent, while a value of 0.0 indicates no match.

meaningToString

public static java.lang.String meaningToString(java.lang.Object oWd)
Converts a word definition to its string representation.

Parameters:
oWd - The word definition object to represent as string.
Returns:
A string representation of the word definition object.
See Also:
WordDefinition

main

public static void main(java.lang.String[] args)
Test function. Compares two words and tests the comparison function.

Parameters:
args - The command line parameters. They are not used.