public abstract class AbstractIndexReader extends Object implements IndexReader
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
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
AbstractIndexReader(boolean relationSupported) |
AbstractIndexReader(boolean relationSupported,
CollectionReader collectionReader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method releases all occupied resources.
|
IRCollection |
getCollection() |
IRDoc |
getDoc(int index) |
IRDoc |
getDoc(String key) |
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(String key) |
Article |
getOriginalDoc(int index) |
Article |
getOriginalDoc(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) |
String |
getTermKey(int index) |
IRTerm[] |
getTermList(int docIndex) |
boolean |
isRelationSupported() |
void |
setIRDocKeyList(SimpleElementList keyList) |
void |
setIRTermKeyList(SimpleElementList keyList) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeprotected 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
public AbstractIndexReader(boolean relationSupported)
public AbstractIndexReader(boolean relationSupported,
CollectionReader collectionReader)
public IntSparseMatrix getDocTermMatrix()
public IntSparseMatrix getTermDocMatrix()
public IntSparseMatrix getDocRelationMatrix()
public IntSparseMatrix getRelaitonDocMatrix()
public void close()
IndexReaderclose 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 termpublic String getTermKey(int index)
getTermKey in interface IndexReaderpublic IRTerm getIRTerm(String key)
getIRTerm in interface IndexReaderkey - the name of the termpublic IRTerm getIRTerm(int termIndex, int docIndex)
IndexReadergetIRTerm in interface IndexReadertermIndex - the index of the termdocIndex - the index of the documentpublic IRTerm[] getTermList(int docIndex)
getTermList in interface IndexReaderdocIndex - the index of the documentpublic int[] getTermFrequencyList(int docIndex)
IndexReadergetTermFrequencyList in interface IndexReaderdocIndex - the index of the documentpublic int[] getTermIndexList(int docIndex)
getTermIndexList in interface IndexReaderdocIndex - the index of the documentpublic IRRelation getIRRelation(int index)
getIRRelation in interface IndexReaderindex - the index of the relationpublic IRRelation getIRRelation(int relationIndex, int docIndex)
IndexReadergetIRRelation in interface IndexReaderrelationIndex - the index of the relationdocIndex - the index of the documentpublic int[] getRelationIndexList(int docIndex)
getRelationIndexList in interface IndexReaderdocIndex - the index of the documentpublic int[] getRelationFrequencyList(int docIndex)
IndexReadergetRelationFrequencyList in interface IndexReaderdocIndex - the index of the documentpublic IRRelation[] getRelationList(int docIndex)
getRelationList in interface IndexReaderdocIndex - the index of the documentpublic IRCollection getCollection()
getCollection in interface IndexReaderpublic IRDoc getDoc(int index)
getDoc in interface IndexReaderindex - the index of the documentpublic String getDocKey(int index)
getDocKey in interface IndexReaderindex - the index of the documentpublic IRDoc getDoc(String key)
getDoc in interface IndexReaderkey - the unique etnry number of the documentpublic Article getOriginalDoc(String key)
getOriginalDoc in interface IndexReaderkey - the unique entry number of the documentpublic Article getOriginalDoc(int index)
getOriginalDoc in interface IndexReaderindex - the index of the documentpublic int[] getTermDocIndexList(int termIndex)
getTermDocIndexList in interface IndexReadertermIndex - the index of the termpublic IRDoc[] getTermDocList(int termIndex)
getTermDocList in interface IndexReadertermIndex - the index of the termpublic int[] getTermDocFrequencyList(int termIndex)
getTermDocFrequencyList in interface IndexReadertermIndex - the index of the termpublic int[] getRelationDocFrequencyList(int relationIndex)
getRelationDocFrequencyList in interface IndexReaderrelationIndex - the index of the relationpublic IRDoc[] getRelationDocList(int relationIndex)
getRelationDocList in interface IndexReaderrelationIndex - the index of the relationpublic int[] getRelationDocIndexList(int relationIndex)
getRelationDocIndexList in interface IndexReaderrelationIndex - the index of the relationCopyright © 2018 JULIE Lab, Germany. All rights reserved.