emolib.wsd.simlib
Class IndexBroker

java.lang.Object
  extended by emolib.wsd.simlib.IndexBroker

public class IndexBroker
extends java.lang.Object

Title: Java WordNet Similarity

Description: Assesses the semantic similarity between a pair of words as described in Seco, N., Veale, T., Hayes, J. (2004) "An Intrinsic Information Content Metric for Semantic Similarity in WordNet". In Proceedings of the European Conference of Artificial Intelligence

This Class interfaces with the index files facilitating word and synset lookups

Copyright: Nuno Seco Copyright (c) 2004

Version:
1.0
Author:
Nuno Seco

Field Summary
static java.lang.String HYPERNYM
          A static constant that represents the field name that holds the list of hypernym offsets of each document.
static java.lang.String INFORMATION_CONTENT
          A static constant that represents the field name that holds the information Content value of each document.
static java.lang.String SYNSET
          A static constant that represents the field name that holds the offset value of each document.
static java.lang.String WORDS
          A static constant that represents the field name that holds the list of words of each document.
 
Constructor Summary
IndexBroker()
          The Constructor.
IndexBroker(java.lang.String wnIndexPath)
          Modified: 1-Feb-2009 By: atrilla
 
Method Summary
 org.apache.lucene.search.Hits getHits(java.lang.String query)
          Returns the list of documents that fulfill the given query.
 IndexBroker getInstance()
          Static method that allows other objects to aquire a reference to an existing broker.
 IndexBroker getInstance(java.lang.String wnIndexPath)
          Modified: 1-Feb-2009 By: atrilla
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYNSET

public static final java.lang.String SYNSET
A static constant that represents the field name that holds the offset value of each document.

See Also:
Constant Field Values

WORDS

public static final java.lang.String WORDS
A static constant that represents the field name that holds the list of words of each document.

See Also:
Constant Field Values

HYPERNYM

public static final java.lang.String HYPERNYM
A static constant that represents the field name that holds the list of hypernym offsets of each document. This list also contains the offset of the documented in which it is contained.

See Also:
Constant Field Values

INFORMATION_CONTENT

public static final java.lang.String INFORMATION_CONTENT
A static constant that represents the field name that holds the information Content value of each document.

See Also:
Constant Field Values
Constructor Detail

IndexBroker

public IndexBroker()
The Constructor. Has private access to allow the implementation of the singleton design pattern. Points the searcher to the index directory, sets the default field to lookup and the defualt operator that is to be assumed when more than one token is given.


IndexBroker

public IndexBroker(java.lang.String wnIndexPath)
Modified: 1-Feb-2009 By: atrilla

Method Detail

getInstance

public IndexBroker getInstance()
Static method that allows other objects to aquire a reference to an existing broker. If no broker exists than a new one is created.

Returns:
IndexBroker

getInstance

public IndexBroker getInstance(java.lang.String wnIndexPath)
Modified: 1-Feb-2009 By: atrilla


getHits

public org.apache.lucene.search.Hits getHits(java.lang.String query)
Returns the list of documents that fulfill the given query.

Parameters:
query - String The query to be searched
Returns:
Hits A list of hits