edu.georgetown.gucs.dictionary
Class CreateDictionary

java.lang.Object
  extended by edu.georgetown.gucs.dictionary.CreateDictionary

public class CreateDictionary
extends java.lang.Object

Creates a Dictionary for testing (uses threaded Dictionary creation)

Author:
Clay Shields

Constructor Summary
CreateDictionary()
          Constructor that creates an empty dictionary and tokenizer list
CreateDictionary(java.lang.String tokenizerFile)
          Constructor that loads a tokenizer configuration file and sets the language of this dictionary
 
Method Summary
 void addTokenizers(java.lang.String configFile)
          Reads an XML file that specifies which tokenizers to use for this dictionary
 void create(java.lang.String dictName, java.lang.String dirPath)
          Outputs this dictionary, created for the given directory, to a file
static void main(java.lang.String[] args)
           
 void setTokenizers(java.util.Vector<java.lang.String> tokenizerVec)
          Sets the list of tokenizers to use during dictionary creation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateDictionary

public CreateDictionary()
Constructor that creates an empty dictionary and tokenizer list


CreateDictionary

public CreateDictionary(java.lang.String tokenizerFile)
Constructor that loads a tokenizer configuration file and sets the language of this dictionary

Parameters:
tokenizerFile - the string XML filename that specifies tokenizers to use
Method Detail

setTokenizers

public void setTokenizers(java.util.Vector<java.lang.String> tokenizerVec)
Sets the list of tokenizers to use during dictionary creation. These tokenizers can convert the text from the dictionary's files into tokens and further filter the specific tokens to be used in this dictionary.

Parameters:
tokenizerVec - the vector of tokenizer names to use to create this dictionary

addTokenizers

public void addTokenizers(java.lang.String configFile)
Reads an XML file that specifies which tokenizers to use for this dictionary

Parameters:
configFile - the string name of the XML configuration file containing this dictionary's tokenizers

create

public void create(java.lang.String dictName,
                   java.lang.String dirPath)
Outputs this dictionary, created for the given directory, to a file

Parameters:
dictName - the string name/path of this dictionary (also the name of the XML file containing this dictionary)
dirPath - the string path to the directory used to create this dictionary

main

public static void main(java.lang.String[] args)