|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.structures.indexing.DocumentPostingList
org.terrier.structures.indexing.FieldDocumentPostingList
public class FieldDocumentPostingList
FieldDocumentPostingList class
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.terrier.structures.indexing.DocumentPostingList |
|---|
DocumentPostingList.postingIterator |
| Field Summary | |
|---|---|
protected gnu.trove.TObjectIntHashMap<java.lang.String>[] |
field_occurrences
occurrences of terms in fields |
protected int |
fieldCount
number of fields |
protected int[] |
fieldLengths
length of each field |
| Fields inherited from class org.terrier.structures.indexing.DocumentPostingList |
|---|
AVG_DOCUMENT_UNIQUE_TERMS, documentLength, occurrences |
| Constructor Summary | |
|---|---|
FieldDocumentPostingList(int NUM_FIELDS)
constructor |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all postings from this document |
DocumentIndexEntry |
getDocumentStatistics()
Return a DocumentIndexEntry for this document |
int[] |
getFieldFrequencies(java.lang.String term)
Return the frequencies of the specified term in all of the fields |
int[][] |
getPostings()
Returns the postings suitable to be written into the direct index. |
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,
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 |
protected IterablePosting |
makePostingIterator(java.lang.String[] _terms,
int[] termIds)
|
| Methods inherited from class org.terrier.structures.indexing.DocumentPostingList |
|---|
forEachTerm, getDocumentLength, getFrequency, getNumberOfPointers, getPostings2, getTermId, insert, insert, termSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final int fieldCount
protected final int[] fieldLengths
protected final gnu.trove.TObjectIntHashMap<java.lang.String>[] field_occurrences
| Constructor Detail |
|---|
public FieldDocumentPostingList(int NUM_FIELDS)
NUM_FIELDS - | Method Detail |
|---|
public void insert(int tf,
java.lang.String term,
int fieldNum)
tf - frequency of the term in this documentterm - String form of termfieldNum - fieldNumber it occurs in
public void insert(java.lang.String term,
int fieldNum)
term - the Term being insertedfieldNum - the id of the field that the term was found in
public void insert(java.lang.String term,
int[] fieldNums)
term - the Term being insertedfieldNums - the ids of the fields that the term was found in, starting from 0
public 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[] getFieldFrequencies(java.lang.String term)
public DocumentIndexEntry getDocumentStatistics()
getDocumentStatistics in class DocumentPostingListpublic void clear()
DocumentPostingList
clear in class DocumentPostingListpublic int[][] getPostings()
DocumentPostingList
getPostings in class DocumentPostingList
protected IterablePosting makePostingIterator(java.lang.String[] _terms,
int[] termIds)
makePostingIterator in class DocumentPostingList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||