dragon.ir.topicmodel
Class AbstractTopicModel
java.lang.Object
|
+--dragon.ir.topicmodel.AbstractModel
|
+--dragon.ir.topicmodel.AbstractTopicModel
- All Implemented Interfaces:
- TopicModel
- Direct Known Subclasses:
- AspectModel, GibbsLDA, SimpleMixtureModel
- public abstract class AbstractTopicModel
- extends AbstractModel
- implements TopicModel
Abstract class of topic model
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 |
themeNum
protected int themeNum
termNum
protected int termNum
docNum
protected int docNum
arrThemeTerm
protected double[][] arrThemeTerm
arrDocTheme
protected double[][] arrDocTheme
indexReader
protected IndexReader indexReader
AbstractTopicModel
public AbstractTopicModel(IndexReader indexReader)
getTopicNum
public int getTopicNum()
- Specified by:
getTopicNum in interface TopicModel
getTopic
public double[] getTopic(int topicIndex)
- Specified by:
getTopic in interface TopicModel
- Parameters:
topicIndex - the index of the topic
- Returns:
- the distribution (over words) of the given topic
getDocNum
public int getDocNum()
- Specified by:
getDocNum in interface TopicModel
- Returns:
- the number of documents
getDocTopics
public double[] getDocTopics(int docIndex)
- Specified by:
getDocTopics in interface TopicModel
- Parameters:
docIndex - the index of the document
- Returns:
- the distribution (over topics) of the given document
getTermNum
public int getTermNum()
- Specified by:
getTermNum in interface TopicModel
- Returns:
- the number of topical terms
getTermName
public java.lang.String getTermName(int termIndex)
- Specified by:
getTermName in interface TopicModel
- Parameters:
termIndex - the index of the topical term
- Returns:
- the name of the given topical term