Skip to content

Tokenise before calling ntoken() on corpus objects - #107

Merged
chainsawriot merged 1 commit into
gesistsa:v0.7from
kbenoit:fix-ntoken-corpus
Oct 19, 2026
Merged

chainsawriot merged 1 commit into
gesistsa:v0.7from
kbenoit:fix-ntoken-corpus

Conversation

@kbenoit

@kbenoit kbenoit commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

quanteda has deprecated ntoken() on corpus and character input since 4.0. The upcoming quanteda 4.5.1 now emits the deprecation warning, which makes the "summarise_oolong problem #59" test fail because it asserts there are no warnings (found by reverse-dependency checks).

This calls ntoken(tokens(x)) instead, in .length_plot(), the gold-standard summary and the overview vignette. Token counts are unchanged, and the code works with older quanteda, so the quanteda (>= 3.0.0) requirement is unaffected.

test-summarize_oolong.R passes with no warnings under both quanteda 4.5.0 (CRAN) and the development 4.5.1.

quanteda has deprecated ntoken() on corpus and character input since 4.0,
and now warns about it, which makes the "summarise_oolong problem gesistsa#59"
test fail because it expects no warnings. Call ntoken(tokens(x)) in
.length_plot() and the gold-standard summary, and in the overview
vignette. Counts are unchanged, and the code works with older quanteda.
@chainsawriot
chainsawriot merged commit 35df523 into gesistsa:v0.7 Oct 19, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants