|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.structures.LexiconInputStream uk.ac.gla.terrier.structures.BlockLexiconInputStream uk.ac.gla.terrier.structures.UTFBlockLexiconInputStream
public class UTFBlockLexiconInputStream
An input stream for accessing sequentially the entries of a block lexicon.
Constructor Summary | |
---|---|
UTFBlockLexiconInputStream()
A default constructor. |
|
UTFBlockLexiconInputStream(java.io.DataInput in)
Read a lexicon from the specified input stream |
|
UTFBlockLexiconInputStream(java.io.File file)
A constructor given the filename. |
|
UTFBlockLexiconInputStream(java.lang.String filename)
A constructor given the filename. |
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. |
void |
print()
Prints out the contents of the lexicon file to check. |
int |
readNextEntry()
Read the next lexicon entry. |
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.BlockLexiconInputStream |
---|
getBlockFrequency |
Methods inherited from class uk.ac.gla.terrier.structures.LexiconInputStream |
---|
close, getEndBitOffset, getEndOffset, getEntrySize, getNt, getNumberOfPointersRead, getNumberOfTermsRead, getNumberOfTokensRead, getStartBitOffset, getStartOffset, getTermId, getTF, iterator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UTFBlockLexiconInputStream()
public UTFBlockLexiconInputStream(java.lang.String filename)
filename
- java.lang.String the name of the lexicon file.public UTFBlockLexiconInputStream(java.io.File file)
file
- java.io.File the name of the lexicon file.public UTFBlockLexiconInputStream(java.io.DataInput in)
Method Detail |
---|
public int readNextEntry() throws java.io.IOException
readNextEntry
in class BlockLexiconInputStream
java.io.IOException
- if an I/O error occurspublic int numberOfEntries()
numberOfEntries
in class BlockLexiconInputStream
public int readNextEntryBytes() throws java.io.IOException
readNextEntryBytes
in class LexiconInputStream
java.io.IOException
- if an I/O error occurspublic void print()
print
in class BlockLexiconInputStream
public java.lang.String getTerm()
getTerm
in class LexiconInputStream
public 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 |