gov.nih.nlm.nls.gspell
Class Candidates

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

public final class Candidates
extends java.lang.Object

Candidates is a collection of candididate. This container has the property that it can distribute candidates sorted by rank. Mon Jul 23 11:24:40 EDT 2001, divita Initial Version


Constructor Summary
Candidates(int pInitialSize)
          This is a constructor for Candidates
Candidates(int pInitialSize, SimpleCorpusStatistics pCorpusLookupInstance)
          This is a constructor for Candidates
 
Method Summary
 void add(java.lang.String pDocument, int pRank, java.lang.String pMethod)
          Method add
 void calculateCorpusFrequencies()
          Method calculateCorpusFrequencies
 void clear()
           
 Candidate[] get()
           
 Candidate[] get(int pTruncateSize)
           
 boolean isCorrect()
          Method isCorrect returns true if one of the candidates matches the query
 void setIsCorrect()
          Method setIsCorrect this flag should be turned on if one of the candidates matches the query
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Candidates

public Candidates(int pInitialSize)
This is a constructor for Candidates

Parameters:
pInitialSize -

Candidates

public Candidates(int pInitialSize,
                  SimpleCorpusStatistics pCorpusLookupInstance)
           throws java.lang.Exception
This is a constructor for Candidates

Parameters:
pInitialSize -
pCorpusLookupInstance -
Method Detail

size

public final int size()

add

public final void add(java.lang.String pDocument,
                      int pRank,
                      java.lang.String pMethod)
Method add

Parameters:
pDocument -
pRank - An int ranking
pMethod - A method such as NGrams|MetaPhone|CommonMisspelling|...

setIsCorrect

public final void setIsCorrect()
Method setIsCorrect this flag should be turned on if one of the candidates matches the query


isCorrect

public final boolean isCorrect()
Method isCorrect returns true if one of the candidates matches the query


get

public final Candidate[] get()

get

public final Candidate[] get(int pTruncateSize)

clear

public final void clear()

calculateCorpusFrequencies

public void calculateCorpusFrequencies()
                                throws java.lang.Exception
Method calculateCorpusFrequencies

Throws:
java.lang.Exception


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.