anl.aida.core
Class STCBuilder
java.lang.Object
anl.aida.core.STCBuilder
public class STCBuilder
- extends java.lang.Object
Builds an ScoredTermsCollection given MIFSTerms and Documents.
Method Summary |
void |
addDocument(int docId,
java.lang.String title,
java.lang.String path)
|
void |
addScore(int docId,
int termIndex,
int freq,
float score)
Adds a score for the specified doc and term. |
java.lang.Integer |
addTerm(java.lang.String termText)
|
java.lang.Integer |
addTerm(java.lang.String termText,
int docCount,
int minFreq,
int maxFreq,
float minScore,
float maxScore)
|
ScoredTermsCollection |
createSTC(boolean calculateTermStats)
|
boolean |
hasDocument(int docId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
collection
private STCBuilder.STCollection collection
termList
private java.util.List<STCBuilder.TermImpl> termList
termMap
private java.util.Map<java.lang.String,java.lang.Integer> termMap
STCBuilder
public STCBuilder(DateRange range)
createSTC
public ScoredTermsCollection createSTC(boolean calculateTermStats)
throws AIDAException
- Throws:
AIDAException
addScore
public void addScore(int docId,
int termIndex,
int freq,
float score)
- Adds a score for the specified doc and term. If the term already has a score
for that doc, then the results are added together.
- Parameters:
docId
- termIndex
- freq
- score
-
hasDocument
public boolean hasDocument(int docId)
addDocument
public void addDocument(int docId,
java.lang.String title,
java.lang.String path)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
addTerm
public java.lang.Integer addTerm(java.lang.String termText,
int docCount,
int minFreq,
int maxFreq,
float minScore,
float maxScore)
addTerm
public java.lang.Integer addTerm(java.lang.String termText)