|
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.LexiconOutputStream
uk.ac.gla.terrier.structures.BlockLexiconOutputStream
uk.ac.gla.terrier.structures.UTFBlockLexiconOutputStream
public class UTFBlockLexiconOutputStream
An output stream for writing the lexicon to a file sequentially.
| Constructor Summary | |
|---|---|
UTFBlockLexiconOutputStream()
A default constructor. |
|
UTFBlockLexiconOutputStream(java.io.DataOutput out)
Create a lexicon using the specified data stream |
|
UTFBlockLexiconOutputStream(java.io.File file)
A constructor given the file. |
|
UTFBlockLexiconOutputStream(java.lang.String filename)
A constructor given the filename. |
|
| Method Summary | |
|---|---|
void |
setBF(int blockFrequency)
Sets the block frequency for the given term |
int |
writeNextEntry(byte[] term,
int termId,
int documentFrequency,
int termFrequency,
int blockFrequency,
long endOffset,
byte endBitOffset)
Write a lexicon entry. |
int |
writeNextEntry(java.lang.String term,
int termId,
int documentFrequency,
int termFrequency,
int blockFrequency,
long endOffset,
byte endBitOffset)
Write a lexicon entry. |
| Methods inherited from class uk.ac.gla.terrier.structures.LexiconOutputStream |
|---|
close, getNumberOfPointersWritten, getNumberOfTermsWritten, getNumberOfTokensWritten, setEndBitOffset, setEndOffset, setNt, setTerm, setTermId, setTF, writeNextEntry, writeNextEntry |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UTFBlockLexiconOutputStream()
public UTFBlockLexiconOutputStream(java.lang.String filename)
filename - java.lang.String the name of the lexicon file.public UTFBlockLexiconOutputStream(java.io.File file)
file - java.io.File the lexicon file.public UTFBlockLexiconOutputStream(java.io.DataOutput out)
| Method Detail |
|---|
public int writeNextEntry(java.lang.String term,
int termId,
int documentFrequency,
int termFrequency,
int blockFrequency,
long endOffset,
byte endBitOffset)
throws java.io.IOException
writeNextEntry in class BlockLexiconOutputStreamterm - the string representation of the termtermId - the terms integer identifierdocumentFrequency - the term's document frequency in the collectiontermFrequency - the term's frequency in the collectionendOffset - the term's ending byte offset in the inverted fileendBitOffset - 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,
int blockFrequency,
long endOffset,
byte endBitOffset)
throws java.io.IOException
writeNextEntry in class BlockLexiconOutputStreamterm - the byte array representation of the termtermId - the terms integer identifierdocumentFrequency - the term's document frequency in the collectiontermFrequency - the term's frequency in the collectionendOffset - the term's ending byte offset in the inverted fileendBitOffset - the term's ending byte bit-offset in the inverted fileblockFrequency - the term's frequency in the collection
java.io.IOException - if an I/O error occurspublic void setBF(int blockFrequency)
setBF in class BlockLexiconOutputStreamblockFrequency - The new block frequency
|
Terrier IR Platform 2.2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||