Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get word-topic probability using mallet

Tags:

java

mallet

I've made a parallel topic model using mallet.

And I want to get top-words for each document.

To do that, I'm trying to get a word-topic probability matrix.

How would I achieve this?

like image 622
user2932547 Avatar asked Dec 25 '22 18:12

user2932547


1 Answers

When you are building topics using MALLET, you have an option called --word-topic-counts-file. When you give this option and specify a file, MALLET writes ( topic, word, probability ) values per each line in the file. You can later read this file in C, Java or R (of course, any language) to create the matrix you want.

like image 138
Praveen Avatar answered Dec 28 '22 09:12

Praveen