Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - API could allow the corpus to be created accretively #12

Open
0o-de-lally opened this issue Apr 29, 2017 · 2 comments
Open

Feature - API could allow the corpus to be created accretively #12

0o-de-lally opened this issue Apr 29, 2017 · 2 comments

Comments

@0o-de-lally
Copy link

I'd like to be able to add sentences over time to the corpus, and not all at once.
Something like:
var index = lda.addSentence('string') // returns an array index or unique id

which later could use:

var topicModel = lda.process(index, numTopics, termsPer)

@primaryobjects do you have any thoughts on this?

@primaryobjects
Copy link
Owner

lda works by building a dictionary of all unique terms, so it needs to know all of the words ahead of time. What you could do though, is when adding a new word, rebuild the dictionary and recalculate the topics.

Feel free to fork! :)

@mikelax
Copy link

mikelax commented Sep 21, 2017

Similar to what @lpgeiger suggested above would be to separate the logic of executing the calculation from that of constructing the lda object and building the document list.

So you could add new functions such as:
addDocument(doc)
addDocuments(docsArray)
execute(numTopics, termCount)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants