|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.structures.LexiconInputStream
uk.ac.gla.terrier.structures.UTFLexiconInputStream
public class UTFLexiconInputStream
This class implements an input stream for the lexicon structure.
| Constructor Summary | |
|---|---|
UTFLexiconInputStream()
A default constructor. |
|
UTFLexiconInputStream(java.io.DataInput in)
Read a lexicon from the specified input stream |
|
UTFLexiconInputStream(java.io.File file)
A constructor given the filename. |
|
UTFLexiconInputStream(java.lang.String filename)
A constructor given the filename. |
|
UTFLexiconInputStream(java.lang.String path,
java.lang.String prefix)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getTerm()
Returns the string representation of the term. |
byte[] |
getTermCharacters()
Returns the bytes of the String. |
int |
numberOfEntries()
Returns the number of entries in the lexicon file. |
int |
readNextEntry()
Read the next lexicon entry, where the term is parsed as a string. |
int |
readNextEntryBytes()
Read the next lexicon entry, where the term is saved as a byte array. |
| Methods inherited from class uk.ac.gla.terrier.structures.LexiconInputStream |
|---|
close, getEndBitOffset, getEndOffset, getEntrySize, getNt, getNumberOfPointersRead, getNumberOfTermsRead, getNumberOfTokensRead, getStartBitOffset, getStartOffset, getTermId, getTF, iterator, print |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UTFLexiconInputStream()
public UTFLexiconInputStream(java.lang.String filename)
filename - java.lang.String the name of the lexicon file.public UTFLexiconInputStream(java.io.File file)
file - java.io.File the name of the lexicon file.
public UTFLexiconInputStream(java.lang.String path,
java.lang.String prefix)
public UTFLexiconInputStream(java.io.DataInput in)
| Method Detail |
|---|
public int readNextEntry()
throws java.io.IOException
readNextEntry in class LexiconInputStreamjava.io.IOException - if an I/O error occurs
public int readNextEntryBytes()
throws java.io.IOException
readNextEntryBytes in class LexiconInputStreamjava.io.IOException - if an I/O error occurspublic int numberOfEntries()
numberOfEntries in class LexiconInputStreampublic java.lang.String getTerm()
getTerm in class LexiconInputStreampublic byte[] getTermCharacters()
getTermCharacters in class LexiconInputStream
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||