|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwindow.ExractFingerprints
This is the heart of the application which will apply winnowing algorithm to one document and will extract fingerprints
Field Summary | |
private java.lang.String |
content
The string representation of document |
private int |
offset
The offset of the begining of the window |
private java.lang.String |
path
The path to file |
Constructor Summary | |
ExractFingerprints(java.lang.String path)
|
Method Summary | |
java.util.ArrayList |
extract()
The center and the heart of the application which roll the window and fingerprints |
private void |
fileToString()
Convert file to string |
private int |
globalPosition(int min,
int rightEnd)
Compute the global position for one gram |
private boolean |
hasNext()
Determine if the window can be slipped more to he right |
private int |
nextHash()
Getting the next gram |
private Fingerprint |
record(int hashValue,
int position)
Save the fingerprint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String path
private java.lang.String content
private int offset
Constructor Detail |
public ExractFingerprints(java.lang.String path) throws java.io.FileNotFoundException, FileTooShort
Method Detail |
public java.util.ArrayList extract() throws KGramOutOfBound
KGramOutOfBound
private void fileToString() throws java.io.FileNotFoundException, FileTooShort
java.io.FileNotFoundException
- file must exist
FileTooShort
- file must not be less than W + K - 1private boolean hasNext()
private int nextHash() throws KGramOutOfBound
KGramOutOfBound
- there's no more gramprivate int globalPosition(int min, int rightEnd)
min
- the offset of the gramrightEnd
- the offset of the right end of the window
private Fingerprint record(int hashValue, int position)
hashValue
- the int value corresponding to K-Gramposition
- the place in the document
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |