quanteda
R package quanteda by quanteda — release notes from GitHub.
Text analysis in R keeps optimising its token internals — and builds a path out to torch
◆Recent moves
- 12d ago
Explicit token recompilation and a denser path out to torch
tokens_recompile() gives explicit control over ID reassignment and removing unused types, while query functions like types() and ntoken() stop recompiling tokens_xptr objects implicitly — subsetting now preserves the complete type table, matching dfm behaviour. as.matrix() for tokens returns a dense document-by-position integer matrix, and as.tensor() switches from sparse COO to dense with torch arguments passed through.
View source ↗ - 1y ago
Corpus chunking and cheaper token concatenation
corpus_chunk() splits texts into smaller documents, memory usage for concatenating large tokens objects drops significantly, and tokens_ngrams() gains the apply_if argument already present on compound and lookup operations.
View source ↗ - 1y ago
Faster concatenation and a dfm_lookup naming fix
Concatenation on tokens and tokens_xptr objects gets significantly faster, verbose messages are made consistent, and a dfm_lookup() bug producing wrong feature names under exclusive matching is fixed.
View source ↗ - 2y ago
Minor test and documentation fixes
Two minor fixes: a failing C++ test around fcm() and token re-indexing, and an undeclared package in Rd cross-references.
View source ↗ - 2y ago
Platform-specific test and installation fixes
Fixes for test failures caused by shifting Matrix behaviour on r-devel, an undeclared package in Rd cross-references, and a Fedora installation failure from TBB being searched for in the wrong places.
View source ↗ - 2y ago
CRAN v4.0
⚡ SPARKtokens_xptr objects extend tokens with external pointers, and once converted the pointer-based methods are dispatched automatically. word4 becomes the default tokeniser, thread count becomes adjustable mid-pipeline through quanteda_options(), the magrittr pipe is replaced throughout with R's native pipe, and apply_if lets a tokens operation run on a document subset.
View source ↗