|
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.upgrading.ReverseFile
public class ReverseFile
This class provides some utilities for handling inverted files from the old terrier version.
Concretely:
- Reverses an Inverted File byte to byte (the byte sequence remains the same)
abcdefgh| ... --> hgfedcba | ...
- Converts an inverted file from the old terrier version (using OldBitFile) to this one (reading the contents of the
file and writting the postings in the new format).
- Checks if two inverted files have the same information (this is, the same number of posting lists, with the same
data in them).
Constructor Summary | |
---|---|
ReverseFile()
|
Method Summary | |
---|---|
static boolean |
checkArrays(int[][] one,
int[][] two)
Checks whether two int[][] arrays have the same elements |
static void |
checkIF(java.lang.String invertedFile,
java.lang.String lexiconFile)
Checks if two inverted files contain the same information, without considering the termid or the order of the terms in the files. |
static void |
main(java.lang.String[] args)
Main class |
static void |
reverse(java.lang.String output)
Traverses an inverted file written with the old terrier version, and writes it in the new compressed format. |
static int |
reverseByte(int byteIn)
Reverses one byte. |
static void |
reverseByteByByte(java.lang.String input,
java.lang.String output)
Reverses a file reading byte to byte |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReverseFile()
Method Detail |
---|
public static void reverse(java.lang.String output)
output
- String containing the name of the new inverted file (should replace the old one).public static void checkIF(java.lang.String invertedFile, java.lang.String lexiconFile)
invertedFile
- String file name of the inverted filelexiconFile
- String file name of the lexicon filepublic static boolean checkArrays(int[][] one, int[][] two)
one
- the first int[][] arraytwo
- the second int[][] array
public static void reverseByteByByte(java.lang.String input, java.lang.String output)
input
- String with the file to readoutput
- String output filenaepublic static int reverseByte(int byteIn)
byteIn
- byte to reverse.
public static void main(java.lang.String[] args)
args
- (see help)
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |