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

Normalized probabilities: only 1.0 in output values #6

Closed
aleksandra-miletic opened this issue Jun 9, 2022 · 2 comments
Closed

Normalized probabilities: only 1.0 in output values #6

aleksandra-miletic opened this issue Jun 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@aleksandra-miletic
Copy link

Hi Adrien,

I am currently testing py3langid and I noticed something strange: the normalized probability values in the output are systematically 1.0. I tested texts of different lengths (1 word to several paragraphs) in different languages. I'm using it with Python. Is this something you noticed before?

Thanks,
Aleksandra

@adbar
Copy link
Owner

adbar commented Jun 14, 2022

Hi @aleksandra-miletic, thanks for your feedback. You're right, this is a bug.

I changed the formula to normalize probabilities along the way and apparently didn't check it properly.

The change in numpy data type also affects things a bit, and I didn't implement the possibility to write classify(self, datatype='uint32') although I wrote such an example in the readme... I'm going to fix this.

@adbar adbar added the bug Something isn't working label Jun 14, 2022
@adbar adbar closed this as completed Jun 14, 2022
@aleksandra-miletic
Copy link
Author

Great, thank you!

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

No branches or pull requests

2 participants