There is a newer version of this record available.

Software Open Access

quanteda/quanteda: CRAN v1.5.0

Kenneth Benoit; Kohei Watanabe; Haiyan Wang; Paul Nulty; Adam Obeng; Stefan Müller; Jiong Wei Lua; Aki Matsuo; Christian Mueller; Will Lowe; Pablo Barberá; Tyler Rinker; mark padgham; Christopher Gandrud; José Tomás Atria; Tom Paskhalis; nicmer; lindbrook; hofaichan; etienne-s; hotzeplotz; Thomas J. Leeper; Stas Malavin; Michael W. Kearney; Michael Chirico; Katrin Leinweber; Johannes Gruber

New features

  • Add flatten and levels arguments to as.list.dictionary2() to enable more flexible conversion of dictionary objects. (#1661)
  • In corpus_sample(), the size now works with the by argument, to control the size of units sampled from each group.
  • Improvements to textstat_dist() and textstat_simil(), see below.
  • Long tokens are not discarded automatically in the call to tokens(). (#1713)
Behaviour changes
  • textstat_dist() and textstat_simil() now return sparse symmetric matrix objects using classes from the Matrix package. This replaces the former structure based on the dist class. Computation of these classes is now also based on the fast implementation in the proxyC package. When computing similarities, the new min_simil argument allows a user to ignore certain values below a specified similarity threshold. A new coercion method now exists for converting these returns into a data.frame of pairwise comparisons. Existing methods such as as.matrix(), as.dist(), and as.list() work as they did before.
  • We have removed the "faith", "chi-squared", and "kullback" methods from textstat_dist() and textstat_simil() because these were either not symmetric or not invariant to document or feature ordering. Finally, the selection argument has been deprecated in favour of a new y argument.
  • textstat_readability() now defaults to measure = "Flesch" if no measure is supplied. This makes it consistent with textstat_lexdiv() that also takes a default measure ("TTR") if none is supplied. (#1715)
  • The default values for max_nchar and min_nchar in tokens_select() are now NULL, meaning they are not applied if the user does not supply values. Fixes #1713.
Bug fixes and stability enhancements
  • kwic.corpus() and kwic.tokens() behaviour now aligned, meaning that dictionaries are correctly faceted by key instead of by value. (#1684)
  • Improved formatting of tokens() verbose output. (#1683)
  • Subsetting and printing of subsetted kwic objects is more robust. (#1665)
  • The "Bormuth" and "DRP" measures are now fixed for textstat_readability(). (#1701)

Files (37.0 MB)
Name Size
37.0 MB Download
All versions This version
Views 88728
Downloads 1779
Data volume 5.1 GB333.3 MB
Unique views 83528
Unique downloads 919


Cite as