-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Description
In case is anyone interested. I've made a python extension out of this code. It is more or less the same code, except it is wrapped with python-boost. And it avoids all the intermediate files.
You can use it something like this:
import btm
number_of_topics = 2
alpha = 50/2
beta = 0.0005
n_iters = 50000
btm_model = btm.Model(number_of_topics, alpha, beta, n_iters, 3, True)
btm_model.fit(["sentence 1", "sentence 2", "sentence 2"])
pz = btm_model.get_pz()
pw_z = btm_model.get_pw_z( )
vocabulary = btm_model.vocabulary()
b = btm_model.predict(["ANother sentence"], "sum_b")Metadata
Metadata
Assignees
Labels
No labels