activetext / activeText

R package for using active learning to classify text documents.
6 stars 3 forks source link

Defunct function from quanteda:: called into "functions_active_helper.R" and "functions_analysis.R" #3

Closed tjbrailey closed 6 months ago

tjbrailey commented 6 months ago

Hi there,

Super excited to start working with this package (and loved the paper, too!)

When I run the example code provided below:

set.seed(1)

activeText::bbc_data_all

results <- activeText::active_label(
  docs = activeText::bbc_data_all,
  labels = c("Not Political", "Political"))

and manually provide 10 labels for the 0th iteration, I get the error:

Error:
! The `stem` argument of `dfm()` was deprecated in quanteda 3.0 and is now defunct.
ℹ Please use `dfm_stem()` instead.

This is coming from the file functions_active_helper.R line 447 and functions_analysis.R line 311.

Just wanted to flag this. Let me know if there are any more details I can provide -- session info below.

R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8    LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C                            LC_TIME=English_United Kingdom.utf8    

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RSQLite_2.3.6

loaded via a namespace (and not attached):
 [1] bit_4.0.5         compiler_4.3.2    fastmap_1.1.1     cli_3.6.2         DBI_1.2.2         tools_4.3.2       rstudioapi_0.16.0
 [8] memoise_2.0.1     bit64_4.0.5       vctrs_0.6.5       cachem_1.0.8      blob_1.2.4        rlang_1.1.3      
tjbrailey commented 6 months ago

Of course, everything works fine when you re-install quanteda version 3.0.0, but I figure it is still worth noting or potentially updating activeText to work with the most recent version of quanteda.

shiraito commented 6 months ago

Hi @tjbrailey we are sorry for our slow reply. The current HEAD of the main branch has resolved the issue. Thank you very much for pointing it out!