|
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.LexiconOutputStream uk.ac.gla.terrier.structures.BlockLexiconOutputStream
public class BlockLexiconOutputStream
An output stream for writing the lexicon to a file sequentially.
Constructor Summary | |
---|---|
BlockLexiconOutputStream()
A default constructor. |
|
BlockLexiconOutputStream(java.io.DataOutput out)
Create a lexicon using the specified data stream |
|
BlockLexiconOutputStream(java.io.File file)
A constructor given the file. |
|
BlockLexiconOutputStream(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 blockFrequency,
int termFrequency,
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 BlockLexiconOutputStream()
public BlockLexiconOutputStream(java.lang.String filename)
filename
- java.lang.String the name of the lexicon file.public BlockLexiconOutputStream(java.io.File file)
file
- java.io.File the lexicon file.public BlockLexiconOutputStream(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
term
- 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 occurspublic int writeNextEntry(byte[] term, int termId, int documentFrequency, int blockFrequency, int termFrequency, long endOffset, byte endBitOffset) throws java.io.IOException
term
- 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 file
java.io.IOException
- if an I/O error occurspublic void setBF(int blockFrequency)
blockFrequency
- 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 |