dragon.ir.index.sentence
Class AbstractSentenceIndexer
java.lang.Object
|
+--dragon.ir.index.sentence.AbstractSentenceIndexer
- All Implemented Interfaces:
- Indexer
- Direct Known Subclasses:
- BasicSentenceIndexer, DualSentenceIndexer, OnlineSentenceIndexer
- public abstract class AbstractSentenceIndexer
- extends java.lang.Object
- implements Indexer
The abstract indexder for sentence level indexing
Copyright: Copyright (c) 2005
Company: IST, Drexel University
- Version:
- 1.0
- Author:
- Davis Zhou
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
initialized
protected boolean initialized
parser
protected DocumentParser parser
AbstractSentenceIndexer
public AbstractSentenceIndexer(DocumentParser parser)
index
public abstract boolean index(Sentence sent,
java.lang.String sentKey)
setMinSentenceLength
public void setMinSentenceLength(int minLength)
getMinSentenceLength
public int getMinSentenceLength()
screenArticleContent
public boolean screenArticleContent(boolean useTitle,
boolean useAbstract,
boolean useBody)
setLog
public void setLog(java.lang.String logFile)
- Specified by:
setLog in interface Indexer
indexed
public boolean indexed(java.lang.String docKey)
- Specified by:
indexed in interface Indexer
- Parameters:
docKey - the unique document entry number
- Returns:
- true if this document has been indexed
index
public boolean index(Article article)
- Description copied from interface:
Indexer
- An article has many sections such as title, abstract and body. The selection of sections for indexing is subject to the implemented indexers.
- Specified by:
index in interface Indexer
- Parameters:
article - the article for indexing
- Returns:
- true if indexed successfully
getDocument
protected Document getDocument(Article article)
getSentenceKey
protected java.lang.String getSentenceKey(java.lang.String docKey,
int sentIndex)
writeLog
protected void writeLog(java.lang.String content)
close
public void close()
- Description copied from interface:
Indexer
- This method releases occupied resources.
- Specified by:
close in interface Indexer