gov.nih.nlm.nls.gspell
Class BagOWordsPlusIndex

java.lang.Object
  extended bygov.nih.nlm.nls.gspell.BagOWordsPlusIndex

public final class BagOWordsPlusIndex
extends java.lang.Object

BagOWordsPlusIndex This class creates the index for multi word retrieval using a bag-o-words method, with some help from gspell for those words that are not initially found in the index. Thu Jan 23 14:48:11 EST 2003, divita Initial Version


Constructor Summary
BagOWordsPlusIndex(GlobalBehavior pSettings)
          This is a constructor for BagOWordsPlusIndex
BagOWordsPlusIndex(java.lang.String[] args)
          This is a constructor for BagOWordsPlusIndex.
 
Method Summary
(package private)  void cleanup()
          Method cleanup
(package private)  void exportWordHash()
          Method exportWordHash
(package private)  void exportWuiTuis()
          Method exportWuiTuis
 void flushIndexesOutToDisk()
          Method flushIndexesOutToDisk flushes the cached indexes out to disk and should be called if you are using the index(string) or index(string[]) methods.
(package private)  void flushWordHash()
          Method flushWordHash converts the wordHash to the db.
(package private)  void flushWuiTuis()
          Method flushWuiTuis writes out the index of wui|tui[] ( word ui's|by an array of term uis)
(package private)  void gspellIndexWords()
          Method gspellIndexWords indexes the words for spelling suggestion.
 void index()
          Method index opens up the input file (from --inputFile= commandline option) itterates through each line of it, calling index( String pLine)
 void index(java.util.Collection pTerms)
          Method index takes a Collection of terms and adds it to the indexes.
 void index(java.lang.String pTerm)
          Method index takes a term and adds it to the indexes.
 void index(java.lang.String[] pTerm)
          Method index takes an array of terms and adds it to the indexes.
static void main(java.lang.String[] args)
          main
static void run(java.lang.String[] args)
          Method run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BagOWordsPlusIndex

public BagOWordsPlusIndex(java.lang.String[] args)
                   throws GSpellException
This is a constructor for BagOWordsPlusIndex.

Parameters:
args -
Throws:
GSpellException

BagOWordsPlusIndex

public BagOWordsPlusIndex(GlobalBehavior pSettings)
                   throws java.lang.Exception
This is a constructor for BagOWordsPlusIndex

Parameters:
pSettings -
Throws:
java.lang.Exception
Method Detail

run

public static void run(java.lang.String[] args)
                throws java.lang.Exception
Method run

Parameters:
args -
Throws:
java.lang.Exception

index

public void index()
           throws java.lang.Exception
Method index opens up the input file (from --inputFile= commandline option) itterates through each line of it, calling index( String pLine)

Throws:
java.lang.Exception

index

public void index(java.lang.String pTerm)
           throws java.lang.Exception
Method index takes a term and adds it to the indexes. It should be noted here that this method should not be used to update the indexes. It should also be noted that this class is building up a cache of words each time this method gets called. All strings are read in via this method. Call the method flushCachesToDisk() when finished.

Parameters:
pTerm -
Throws:
java.lang.Exception

index

public void index(java.lang.String[] pTerm)
           throws java.lang.Exception
Method index takes an array of terms and adds it to the indexes. It should be noted here that this method should not be used to update the indexes. It should also be noted that this class is building up a cache of words each time this method gets called. All strings are read in via this method. Call the method flushCachesToDisk() when finished.

Parameters:
pTerm -
Throws:
java.lang.Exception

index

public void index(java.util.Collection pTerms)
           throws java.lang.Exception
Method index takes a Collection of terms and adds it to the indexes. It should be noted here that this method should not be used to update the indexes. It should also be noted that this class is building up a cache of words each time this method gets called. All strings are read in via this method. Call the method flushCachesToDisk() when finished.

Throws:
java.lang.Exception

cleanup

void cleanup()
       throws java.lang.Exception
Method cleanup

Throws:
java.lang.Exception

flushIndexesOutToDisk

public void flushIndexesOutToDisk()
                           throws java.lang.Exception
Method flushIndexesOutToDisk flushes the cached indexes out to disk and should be called if you are using the index(string) or index(string[]) methods.

Throws:
java.lang.Exception

gspellIndexWords

final void gspellIndexWords()
                     throws java.lang.Exception
Method gspellIndexWords indexes the words for spelling suggestion.

Throws:
java.lang.Exception

exportWordHash

final void exportWordHash()
                   throws java.lang.Exception
Method exportWordHash

Throws:
java.lang.Exception

exportWuiTuis

final void exportWuiTuis()
                  throws java.lang.Exception
Method exportWuiTuis

Throws:
java.lang.Exception

flushWordHash

final void flushWordHash()
                  throws java.lang.Exception
Method flushWordHash converts the wordHash to the db.

Throws:
java.lang.Exception

flushWuiTuis

final void flushWuiTuis()
                 throws java.lang.Exception
Method flushWuiTuis writes out the index of wui|tui[] ( word ui's|by an array of term uis)

Throws:
java.lang.Exception

main

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

Parameters:
args - The command line input, tokenized


The use and distribution of this material is subject to the terms and conditions included in the file SPECIALIST_NLP_TOOLS_TERMS_AND_CONDITIONS.TXT, located in the root directory of the distribution.