|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--dragon.ir.index.AbstractIndexReader
AbstractIndexReader implements functions defined in interface IndexReader such as getting termdoc and docterm matrix, getting termkey and dockey, getting termindex and docindex, getting all the indexed terms for a given document, getting all the indexed documents for a given term ...
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Field Summary | |
protected IRCollection |
collection
|
protected CollectionReader |
collectionReader
|
protected IRDocIndexList |
docIndexList
|
protected SimpleElementList |
docKeyList
|
protected IntSparseMatrix |
docrelationMatrix
|
protected IntSparseMatrix |
doctermMatrix
|
protected boolean |
initialized
|
protected IntSparseMatrix |
relationdocMatrix
|
protected IRRelationIndexList |
relationIndexList
|
protected boolean |
relationSupported
|
protected IntSparseMatrix |
termdocMatrix
|
protected IRTermIndexList |
termIndexList
|
protected SimpleElementList |
termKeyList
|
| Constructor Summary | |
AbstractIndexReader(boolean relationSupported)
|
|
AbstractIndexReader(boolean relationSupported,
CollectionReader collectionReader)
|
|
| Method Summary | |
void |
close()
This method releases all occupied resources. |
IRCollection |
getCollection()
|
IRDoc |
getDoc(int index)
|
IRDoc |
getDoc(java.lang.String key)
|
java.lang.String |
getDocKey(int index)
|
IntSparseMatrix |
getDocRelationMatrix()
|
IntSparseMatrix |
getDocTermMatrix()
|
IRRelation |
getIRRelation(int index)
|
IRRelation |
getIRRelation(int relationIndex,
int docIndex)
If the given document does not contain the given relation, this method returns null. |
IRTerm |
getIRTerm(int index)
|
IRTerm |
getIRTerm(int termIndex,
int docIndex)
If the given document does not contain the given term, this method returns null. |
IRTerm |
getIRTerm(java.lang.String key)
|
Article |
getOriginalDoc(int index)
|
Article |
getOriginalDoc(java.lang.String key)
|
IntSparseMatrix |
getRelaitonDocMatrix()
|
int[] |
getRelationDocFrequencyList(int relationIndex)
|
int[] |
getRelationDocIndexList(int relationIndex)
|
IRDoc[] |
getRelationDocList(int relationIndex)
|
int[] |
getRelationFrequencyList(int docIndex)
To know what relation the frequency corresponds to, call the method getRelationIndexList. |
int[] |
getRelationIndexList(int docIndex)
|
IRRelation[] |
getRelationList(int docIndex)
|
int[] |
getTermDocFrequencyList(int termIndex)
|
int[] |
getTermDocIndexList(int termIndex)
|
IRDoc[] |
getTermDocList(int termIndex)
|
IntSparseMatrix |
getTermDocMatrix()
|
int[] |
getTermFrequencyList(int docIndex)
To know what term the frequency corresponds to, call the method getTermIndexList. |
int[] |
getTermIndexList(int docIndex)
|
java.lang.String |
getTermKey(int index)
|
IRTerm[] |
getTermList(int docIndex)
|
boolean |
isRelationSupported()
|
void |
setIRDocKeyList(SimpleElementList keyList)
|
void |
setIRTermKeyList(SimpleElementList keyList)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface dragon.ir.index.IndexReader |
initialize |
| Field Detail |
protected CollectionReader collectionReader
protected SimpleElementList termKeyList
protected IRTermIndexList termIndexList
protected IRRelationIndexList relationIndexList
protected SimpleElementList docKeyList
protected IRDocIndexList docIndexList
protected IntSparseMatrix termdocMatrix
protected IntSparseMatrix doctermMatrix
protected IntSparseMatrix relationdocMatrix
protected IntSparseMatrix docrelationMatrix
protected boolean relationSupported
protected boolean initialized
protected IRCollection collection
| Constructor Detail |
public AbstractIndexReader(boolean relationSupported)
public AbstractIndexReader(boolean relationSupported,
CollectionReader collectionReader)
| Method Detail |
public IntSparseMatrix getDocTermMatrix()
public IntSparseMatrix getTermDocMatrix()
public IntSparseMatrix getDocRelationMatrix()
public IntSparseMatrix getRelaitonDocMatrix()
public void close()
IndexReader
close in interface IndexReaderpublic boolean isRelationSupported()
isRelationSupported in interface IndexReaderpublic void setIRDocKeyList(SimpleElementList keyList)
public void setIRTermKeyList(SimpleElementList keyList)
public IRTerm getIRTerm(int index)
getIRTerm in interface IndexReaderindex - the index of the term
public java.lang.String getTermKey(int index)
getTermKey in interface IndexReaderpublic IRTerm getIRTerm(java.lang.String key)
getIRTerm in interface IndexReaderkey - the name of the term
public IRTerm getIRTerm(int termIndex,
int docIndex)
IndexReader
getIRTerm in interface IndexReadertermIndex - the index of the termdocIndex - the index of the document
public IRTerm[] getTermList(int docIndex)
getTermList in interface IndexReaderdocIndex - the index of the document
public int[] getTermFrequencyList(int docIndex)
IndexReader
getTermFrequencyList in interface IndexReaderdocIndex - the index of the document
public int[] getTermIndexList(int docIndex)
getTermIndexList in interface IndexReaderdocIndex - the index of the document
public IRRelation getIRRelation(int index)
getIRRelation in interface IndexReaderindex - the index of the relation
public IRRelation getIRRelation(int relationIndex,
int docIndex)
IndexReader
getIRRelation in interface IndexReaderrelationIndex - the index of the relationdocIndex - the index of the document
public int[] getRelationIndexList(int docIndex)
getRelationIndexList in interface IndexReaderdocIndex - the index of the document
public int[] getRelationFrequencyList(int docIndex)
IndexReader
getRelationFrequencyList in interface IndexReaderdocIndex - the index of the document
public IRRelation[] getRelationList(int docIndex)
getRelationList in interface IndexReaderdocIndex - the index of the document
public IRCollection getCollection()
getCollection in interface IndexReaderpublic IRDoc getDoc(int index)
getDoc in interface IndexReaderindex - the index of the document
public java.lang.String getDocKey(int index)
getDocKey in interface IndexReaderindex - the index of the document
public IRDoc getDoc(java.lang.String key)
getDoc in interface IndexReaderkey - the unique etnry number of the document
public Article getOriginalDoc(java.lang.String key)
getOriginalDoc in interface IndexReaderkey - the unique entry number of the document
public Article getOriginalDoc(int index)
getOriginalDoc in interface IndexReaderindex - the index of the document
public int[] getTermDocIndexList(int termIndex)
getTermDocIndexList in interface IndexReadertermIndex - the index of the term
public IRDoc[] getTermDocList(int termIndex)
getTermDocList in interface IndexReadertermIndex - the index of the term
public int[] getTermDocFrequencyList(int termIndex)
getTermDocFrequencyList in interface IndexReadertermIndex - the index of the term
public int[] getRelationDocFrequencyList(int relationIndex)
getRelationDocFrequencyList in interface IndexReaderrelationIndex - the index of the relation
public IRDoc[] getRelationDocList(int relationIndex)
getRelationDocList in interface IndexReaderrelationIndex - the index of the relation
public int[] getRelationDocIndexList(int relationIndex)
getRelationDocIndexList in interface IndexReaderrelationIndex - the index of the relation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||