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

Tokenizer.gen_pfdict method does not guard against duplicate entries. #977

Open
ericlingit opened this issue Sep 30, 2022 · 0 comments
Open

Comments

@ericlingit
Copy link

When generating a prefix dictionary from dict.txt, duplicate entries are still added to the total variable ltotal.

dup-in-dict-txt

The term frequency for B超 3 n is added twice in gen_pfdict() method. As a result, the returned total is off by 3.

The sum of term frequency should be 60,101,964, but 60,101,967 is returned.

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

No branches or pull requests

1 participant