quanteda / quanteda.textstats

Textual statistics for quanteda
GNU General Public License v3.0
14 stars 2 forks source link

textstat_collocations error #13

Open danilovcorrea opened 5 years ago

danilovcorrea commented 5 years ago
collocations <- textstat_collocations(token.corpus, 
                                     size = 2:5, 
                                     min_count = 4,
                                     tolower = TRUE)

#>  Error in qatd_cpp_collocations(x, types, id_ignore, min_count, size, if (method ==  : 
  std::bad_alloc

#> end_time - start_time
#> Time difference of 4.164202 mins

Don't know how to give a reproducible example due to token.corpus size (1GB).

koheiw commented 5 years ago

How much RAM do you have on your machine?

danilovcorrea commented 5 years ago

Hi @koheiw , 16GB.

koheiw commented 5 years ago

I will investigate but it is probably related to size = 2:5. I almost never used larger than 2.