textmaven.dictionaries
Class CreateLuceneDict

java.lang.Object
  extended bytextmaven.dictionaries.CreateLuceneDict
All Implemented Interfaces:
Globals

public class CreateLuceneDict
extends java.lang.Object
implements Globals

Utility class to create a lucene dictionary from any configured one.

Author:
Peter Kolloch

Field Summary
 
Fields inherited from interface textmaven.Globals
C_ATTR_CLASSNAME, C_DICT_BASE_TYPE, C_DICT_TYPE, C_SERVER_BASE_TYPE, C_STEMMER_BASE_TYPE, C_WRITER_BASE_TYPE, CONFIG_FILE, DEFAULT_SENTENCES, DEFAULT_SEPARATOR, NEW_PARA, T_COL_DICTIONARY, T_COL_HOMONYMID, T_COL_ID, T_COL_LEXKEY, T_COL_TRANSLATION, T_COL_WORDCLASS, VERBOSE
 
Constructor Summary
CreateLuceneDict()
           
 
Method Summary
static void create(java.lang.String filename, IDictionary dict)
           
static void insertKeys(java.lang.String sourceName, java.util.Iterator translations, org.apache.lucene.index.IndexWriter writer, IStemmer stemmer)
           
static void main(java.lang.String[] args)
          Expects a source ID and an index path name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateLuceneDict

public CreateLuceneDict()
Method Detail

create

public static void create(java.lang.String filename,
                          IDictionary dict)
                   throws java.io.IOException
Throws:
java.io.IOException

insertKeys

public static void insertKeys(java.lang.String sourceName,
                              java.util.Iterator translations,
                              org.apache.lucene.index.IndexWriter writer,
                              IStemmer stemmer)
                       throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Expects a source ID and an index path name. It only considers English sources configured in textmaven.application.translator.application.translator.xml. Copies everything with a starting letter between a-z, A-Z or 0-9 to the new lucene dictionary at the given path.

Throws:
java.io.IOException


Copyright © 2002-2005 Sourceforge. All Rights Reserved.