|
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.indexing.DocumentPostingList
public class DocumentPostingList
Represents the postings of one document. Uses HashMaps internally.
Properties:
Constructor Summary | |
---|---|
DocumentPostingList()
Make a new postings list for a document. |
|
DocumentPostingList(int fieldCount)
Make a new postings list for a document, with the specified number of fields |
Method Summary | |
---|---|
void |
clear()
Removes all postings from this document |
int |
getDocumentLength()
Returns the total number of tokens in this document |
int |
getFields(java.lang.String term)
|
int |
getFrequency(java.lang.String term)
|
int |
getNumberOfPointers()
Returns the number of unique terms in this document. |
int[][] |
getPostings()
returns the postings suitable to be written into the direct index |
void |
insert(int tf,
java.lang.String term)
Insert a term into the posting list of this document |
void |
insert(int tf,
java.lang.String term,
int fieldNum)
Insert a term into the posting list of this document, in the given field, with the given frequency |
void |
insert(int tf,
java.lang.String term,
int[] fieldNums)
Insert a term into the posting list of this document, in the given field |
void |
insert(java.lang.String term)
Insert a term into the posting list of this document |
void |
insert(java.lang.String term,
int fieldNum)
Insert a term into the posting list of this document, in the given field |
void |
insert(java.lang.String term,
int[] fieldNums)
Insert a term into the posting list of this document, in the given field |
java.lang.String[] |
termSet()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocumentPostingList()
public DocumentPostingList(int fieldCount)
fieldCount
- number of fields marked in this indexMethod Detail |
---|
public java.lang.String[] termSet()
public int getFrequency(java.lang.String term)
public int getFields(java.lang.String term)
public void clear()
public int getDocumentLength()
public int getNumberOfPointers()
public void insert(java.lang.String term)
term
- the Term being insertedpublic void insert(int tf, java.lang.String term)
tf
- frequencyterm
- the Term being insertedpublic void insert(int tf, java.lang.String term, int fieldNum)
tf
- frequency of the term in this documentterm
- String form of termfieldNum
- fieldNumber it occurrs inpublic void insert(java.lang.String term, int fieldNum)
term
- the Term being insertedfieldNum
- the id of the field that the term was found inpublic void insert(java.lang.String term, int[] fieldNums)
term
- the Term being insertedfieldNums
- the ids of the fields that the term was found inpublic void insert(int tf, java.lang.String term, int[] fieldNums)
tf
- the frequency of the termterm
- the Term being insertedfieldNums
- the ids of the fields that the term was found inpublic int[][] getPostings()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |