cpsievert / LDAvis

R package for web-based interactive topic model visualization.
Other
557 stars 131 forks source link

polish language available as an additional language in serVis #62

Closed MarcinKosinski closed 8 years ago

MarcinKosinski commented 8 years ago

Now you can have polish sentences in the output

serVis(json, out.dir = 'polish_example', open.browser = FALSE, language = 'polish')

ldavis_polish

Any additional language can be added if you put language_name.txt file into inst/languages directory with 2 columns, where first stands for sentences to be substituted and second for sentences to be used. I also replaced msdwidth in such way.

PS. I used roxygen 5.0.1 to generate documentation. I've seen this has overwritten some documentation pages

cpsievert commented 8 years ago

Looking great @MarcinKosinski! I think we could generalize this a bit more by putting the actual language names in the txt header https://github.com/cpsievert/LDAvis/pull/62/files#diff-dc4a85b53672c07d5dc157c13be605a3R1

Then we could choose the relevant column based on the language argument value

MarcinKosinski commented 8 years ago

Ok, I've made an update. Now we have 1 global dictionary in which people can add additional languages with additional columns :)

cpsievert commented 8 years ago

Great! I'll let @kshirley have a look before we go any further

kshirley commented 8 years ago

This looks really nice @MarcinKosinski !

(I can't believe we had a typo spelling the word "distribution" for ~2 years - nice catch :)

I'll happily merge. @cpsievert , is the next step to update the CRAN copy?

-k

MarcinKosinski commented 8 years ago

But I couldn't find this misspelled distribution in the output :) so it wasn't so bad

2016-07-25 21:17 GMT+02:00 Kenny Shirley notifications@github.com:

Merged #62 https://github.com/cpsievert/LDAvis/pull/62.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cpsievert/LDAvis/pull/62#event-733996082, or mute the thread https://github.com/notifications/unsubscribe-auth/AGdazi3F78FM7oY_lu7hiBlzUqtneZOvks5qZQvHgaJpZM4JUOsi .