|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.gla.terrier.structures.LexiconOutputStream
uk.ac.gla.terrier.structures.UTFLexiconOutputStream
public class UTFLexiconOutputStream
This class implements an output stream for the lexicon structure.
| Constructor Summary | |
|---|---|
UTFLexiconOutputStream()
A default constructor. |
|
UTFLexiconOutputStream(java.io.File file)
A constructor given the filename. |
|
UTFLexiconOutputStream(java.lang.String filename)
A constructor given the filename. |
|
UTFLexiconOutputStream(java.lang.String path,
java.lang.String prefix)
|
|
| Method Summary | |
|---|---|
int |
writeNextEntry(byte[] _term,
int _termId,
int _documentFrequency,
int _termFrequency,
long _endOffset,
byte _endBitOffset)
Writes a lexicon entry. |
int |
writeNextEntry(java.lang.String _term,
int _termId,
int _documentFrequency,
int _termFrequency,
long _endOffset,
byte _endBitOffset)
Writes a lexicon entry. |
| Methods inherited from class uk.ac.gla.terrier.structures.LexiconOutputStream |
|---|
close, getNumberOfPointersWritten, getNumberOfTermsWritten, getNumberOfTokensWritten, setEndBitOffset, setEndOffset, setNt, setTerm, setTermId, setTF |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UTFLexiconOutputStream()
public UTFLexiconOutputStream(java.lang.String filename)
filename - java.lang.String the name of the lexicon file.public UTFLexiconOutputStream(java.io.File file)
file - java.io.File the name of the lexicon file.
public UTFLexiconOutputStream(java.lang.String path,
java.lang.String prefix)
| Method Detail |
|---|
public int writeNextEntry(java.lang.String _term,
int _termId,
int _documentFrequency,
int _termFrequency,
long _endOffset,
byte _endBitOffset)
throws java.io.IOException
writeNextEntry in class LexiconOutputStream_term - the string representation of the term_termId - the terms integer identifier_documentFrequency - the term's document frequency in the collection_termFrequency - the term's frequency in the collection_endOffset - the term's ending byte offset in the inverted file_endBitOffset - the term's ending byte bit-offset in the inverted file
java.io.IOException - if an I/O error occurs
public int writeNextEntry(byte[] _term,
int _termId,
int _documentFrequency,
int _termFrequency,
long _endOffset,
byte _endBitOffset)
throws java.io.IOException
writeNextEntry in class LexiconOutputStream_term - the byte representation of the term, as written by DataInput.writeUTF(). This
should be ApplicationSetup.STRING_BYTE_LENGTH +2 in length_termId - the terms integer identifier_documentFrequency - the term's document frequency in the collection_termFrequency - the term's frequency in the collection_endOffset - the term's ending byte offset in the inverted file_endBitOffset - the term's ending byte bit-offset in the inverted file
java.io.IOException - if an I/O error occurs
|
Terrier IR Platform 1.1.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||