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

Make extract-terms, specificity, and sum-up-freq parallelizable #8

Open
parmentf opened this issue Sep 28, 2021 · 0 comments · May be fixed by #9
Open

Make extract-terms, specificity, and sum-up-freq parallelizable #8

parmentf opened this issue Sep 28, 2021 · 0 comments · May be fixed by #9
Labels
bug Something isn't working

Comments

@parmentf
Copy link
Collaborator

extract-terms.js, specificity.js, and sum-up-freq.js use global variable (file-level) to perform accumulations (sums, counting, ...).

That implies that if used in a parallelized workflow (like, say, an ezs server), they may mix the countings, sums, of different inputs.

And that is not the intended way of use, since it will flaw the calculations.

Solution: integrate these global variables into the exported function's context (in its this), and initialize them when this.isFirst() is true.

@parmentf parmentf added the bug Something isn't working label Sep 28, 2021
@parmentf parmentf linked a pull request Sep 28, 2021 that will close this issue
@parmentf parmentf linked a pull request Sep 28, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant