tutorials.quanteda.io | Quanteda tutorials | Static Site Generator library
kandi X-RAY | tutorials.quanteda.io Summary
kandi X-RAY | tutorials.quanteda.io Summary
quanteda tutorials website is created by Hugo based on the Learn theme. Since Hugo accepts only Markdown and HTML, we use blogdown to generate those files from Rmarkdown.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tutorials.quanteda.io
tutorials.quanteda.io Key Features
tutorials.quanteda.io Examples and Code Snippets
Community Discussions
Trending Discussions on tutorials.quanteda.io
QUESTION
I have been doing all the exercises in Tutorials.Quanteda.io, but the section on constructing a DFM uses a corpus called data_corpus_irishbudget2010 doesn't run. This is the code:
toks_irish <- tokens(data_corpus_irishbudget2010, remove_punct = TRUE)
dfmat_irish <- dfm(toks_irish)
print(dfmat_irish)
I get this error:
Error in tokens(data_corpus_irishbudget2010, remove_punct = TRUE) : object 'data_corpus_irishbudget2010' not found
I have been able to load data_char_ukimmig2010 and data_corpus_inaugural. I just installed Quanteda this week. I also ran require(quanteda.corpora) and still can't use the data_corpus_irishbudget2010.
Any ideas?
...ANSWER
Answered 2020-Apr-18 at 07:26That data object has been relocated to the new quanteda.textmodels package. To access it, use:
QUESTION
Using the example for lda from quanteda package
...ANSWER
Answered 2020-Apr-01 at 11:27There are several Goodness-of-Fit (GoF) metrics you can use to assess a LDA model. The most common is called perplexity which you can compute trough the function perplexity()
in the package topicmodels. The way you select the optimal model is to look for a "knee" in the plot. The idea, stemming from unsupervised methods, is to run multiple LDA models with different topics. As the number of topics increases, you should see the perplexity decrease. You want to stop either when you find a knee or when the incremental decrease is negligible. Thin about the scree plot when you run the Principal Component Analysis.
Having said that, there is an R package called ldatuning which implements four additional metrics based on density-based clustering and on Kullback-Leibler divergence. Three of them can be used with both VEM and Gibbs inference, while the method by Griffith can only be used with Gibbs. For some of these metrics you look for the minimum, for other for the maximum. Also, you can always compute the log-likelihood of your model which want to maximize. The way you can extract the likelihood from an LDA
object is pretty straightforward. Let's assume you have an LDA model called ldamodel
:
QUESTION
I am new in sentiment analysis. Quanteda examples show how to output numbers of positive and negative words. I tested some documents. It output below:
Case 1
...ANSWER
Answered 2019-Dec-18 at 10:33If you consider neg_positive
as negative
, and neg_negative
as positive, then you could create your index by combining the pairs of columns. This is plausible because the "neg positive" for instance contains sequences such as "not good".
QUESTION
trying to follow the quanteda
tutorial, I'm running into problems here with the programme; executing the following code, I get error messages hinting at problems with packages I cannot resolve.
ANSWER
Answered 2019-Sep-24 at 16:27The only "solution" I could find was to re-install RStudio
.
QUESTION
I use the example from [here]: https://tutorials.quanteda.io/machine-learning/topicmodel/
...ANSWER
Answered 2019-Feb-13 at 12:04Not entirely sure what the question is but if you want to clean the text in df
and then convert it to a corpus, here would be the way to go:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tutorials.quanteda.io
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page