Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add min_freq and freq_type to textstat_collocations() #68

Open
koheiw opened this issue Jan 4, 2024 · 0 comments
Open

Add min_freq and freq_type to textstat_collocations() #68

koheiw opened this issue Jan 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@koheiw
Copy link
Collaborator

koheiw commented Jan 4, 2024

It is sometimes difficult to set min_count because we don't know how many collocations in the corpus. If the number is too low, we have to wait long time to get the result of computation.

How about adding min_freq and freq_type = c("count", "prop", "rank", "quantile") in a similar way to dfm_trim()? It is only to set min_count besed on the distribution in counts_seq.

for (auto it = counts_seq.begin(); it != counts_seq.end(); ++it) {
// conver to a vector for faster itteration
seqs_all.push_back(std::make_pair(it->first, it->second.first));
if (it->second.first < count_min) continue;

@koheiw koheiw added the enhancement New feature or request label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant