Version 0.3.0

11 views
Skip to first unread message

Jason Adams

unread,
Jul 29, 2009, 4:32:57 PM7/29/09
to lda-ruby
I just pushed the changes for the next minor version of the gem. This
involved a lot of rewriting basic classes like Corpus and Document, so
backwards compatibility is completely broken if you used any of the
inner workings of the classes. I apologize for that, but the way
classes worked in 0.2.2 and below was not well engineered and were
basically a hack to get the C-code working nicely with them.

You will still use it in (almost) the same general way and can still
use data files as before. In addition, you can now load documents
from a YAML file containing a list of documents, or from a directory
containing a list of documents. The name of the gem when you require
it has changed from lda to lda-ruby.

A simple example assuming you have a directory (mydir) of text files
(ending in extension .txt):

require 'lda-ruby'
corpus = Lda::DirectoryCorpus.new('mydir', 'txt')
lda = Lda::Lda.new(corpus)
lda.em('random')
lda.print_topics

Please take a look and let me know what doesn't work and what should
work differently. I added a number of tests so hopefully I caught
most of the bugs.

-- Jason
Reply all
Reply to author
Forward
0 new messages