Class TopicModelProvider
- java.lang.Object
-
- de.julielab.jcore.ae.topicindexing.TopicModelProvider
-
- All Implemented Interfaces:
ITopicModelProvider,org.apache.uima.resource.SharedResourceObject
public class TopicModelProvider extends java.lang.Object implements ITopicModelProvider
-
-
Constructor Summary
Constructors Constructor Description TopicModelProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToIndex(java.lang.String docId, java.util.List<de.julielab.topicmodeling.businessobjects.Topic> topicList)voidallowSave()de.julielab.topicmodeling.businessobjects.ModelgetModel()java.lang.Object[][]getTopWords(int numwords)Return an array (one element for each topic) of arrays of words, which are the most probable words for that topic in descending order.voidload(org.apache.uima.resource.DataResource dataResource)voidsaveModel()voidsetModelSavePath(java.lang.String path)
-
-
-
Method Detail
-
load
public void load(org.apache.uima.resource.DataResource dataResource) throws org.apache.uima.resource.ResourceInitializationException- Specified by:
loadin interfaceorg.apache.uima.resource.SharedResourceObject- Throws:
org.apache.uima.resource.ResourceInitializationException
-
getTopWords
public java.lang.Object[][] getTopWords(int numwords)
Description copied from interface:ITopicModelProviderReturn an array (one element for each topic) of arrays of words, which are the most probable words for that topic in descending order. These are returned as Objects, but will probably be Strings.- Specified by:
getTopWordsin interfaceITopicModelProvider- Parameters:
numwords- The maximum length of each topic's array of words (may be less).
-
getModel
public de.julielab.topicmodeling.businessobjects.Model getModel()
- Specified by:
getModelin interfaceITopicModelProvider
-
setModelSavePath
public void setModelSavePath(java.lang.String path)
- Specified by:
setModelSavePathin interfaceITopicModelProvider
-
allowSave
public void allowSave()
- Specified by:
allowSavein interfaceITopicModelProvider
-
saveModel
public void saveModel() throws java.io.IOException- Specified by:
saveModelin interfaceITopicModelProvider- Throws:
java.io.IOException
-
addToIndex
public void addToIndex(java.lang.String docId, java.util.List<de.julielab.topicmodeling.businessobjects.Topic> topicList)- Specified by:
addToIndexin interfaceITopicModelProvider
-
-