|
Textractor API textractor-720 (20091120123250) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttextractor.mg4j.HashTermMap
public final class HashTermMap
A term map implementation that should allow fast retrieval. The speed comes at the price of a large amount of memory.
| Field Summary | |
|---|---|
static long |
serialVersionUID
Used during deserialization to verify that objects are compatible. |
| Constructor Summary | |
|---|---|
HashTermMap()
|
|
HashTermMap(String termFilename)
Construct and populate this term map. |
|
HashTermMap(TermIterator termIterator,
int startingIndex)
Construct and populate this term map. |
|
| Method Summary | |
|---|---|
int |
getIndex(CharSequence term)
Deprecated. As of MG4J 1.2, replaced by getNumber(CharSequence). |
int |
getNumber(CharSequence term)
Returns the ordinal number corresponding to the given term, or possibly (but not necessarily) -1 if the term was not indexed. |
CharSequence |
getTerm(int index)
Returns the term corresponding to the given index (optional operation). |
MutableString |
getTerm(int i,
MutableString mutableString)
|
boolean |
hasTerms()
Returns true if this prefix map supports term retrieval. |
int |
size()
Returns the number of terms in this term map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long serialVersionUID
| Constructor Detail |
|---|
public HashTermMap(String termFilename)
throws IOException
termFilename - Name of the file that contains the terms to initialize this map with.
IOException
public HashTermMap(TermIterator termIterator,
int startingIndex)
throws IOException
termIterator - Iterator over the termIterator that must be added to this term map.
IOExceptionpublic HashTermMap()
| Method Detail |
|---|
@Deprecated public int getIndex(CharSequence term)
getNumber(CharSequence).
term - a term.
public int getNumber(CharSequence term)
getNumber in interface TermMapterm - a term.
public boolean hasTerms()
hasTerms in interface TermMappublic CharSequence getTerm(int index)
getTerm in interface TermMapindex - a term index.
null if the term was not indexed.
public MutableString getTerm(int i,
MutableString mutableString)
getTerm in interface TermMappublic int size()
size in interface TermMap
|
Textractor API textractor-720 (20091120123250) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||