"Fossies" - the Fresh Open Source Software Archive

Member "chandler-1.0.3/external/PyLucene/PyLucene-2.3.1-3-418/lucene-java-2.3.1/contrib/wordnet/src/java/org/apache/lucene/wordnet/package.html" (26 Apr 2005, 985 Bytes) of package /windows/misc/Chandler_src_1.0.3.tar.gz:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

This package uses synonyms defined by WordNet to build a Lucene index storing them, which in turn can be used for query expansion. You normally run {@link org.apache.lucene.wordnet.Syns2Index} once to build the query index/"database", and then call {@link org.apache.lucene.wordnet.SynExpand#expand SynExpand.expand(...)} to expand a query.


  1. Download the WordNet prolog database , gunzip, untar etc.
  2. Invoke Syn2Index as appropriate to build a synonym index. It'll take 2 arguments, the path to wn_s.pl from that WordNet downlaod, and the index name.
  3. Update your UI so that as appropriate you call SynExpand.expand(...) to expand user queries with synonyms.