nickdavidhaynes / spacy-cld

Language detection extension for spaCy 2.0+
MIT License
111 stars 9 forks source link

Language score - denominator should be float #4

Closed Nozdi closed 6 years ago

Nozdi commented 6 years ago

https://github.com/nickdavidhaynes/spacy-cld/blob/2eb659d956924e26b47cba9e2c2a8ce3ebfe8b1f/spacy_cld/spacy_cld.py#L15

Python 2.X for compatibility with it should be 100. (float).

Python 3:

In [1]: 10/100
Out[1]: 0.1

Python 2:

In [1]: 10/100
Out[1]: 0

In [2]: 10/100.
Out[2]: 0.1
nickdavidhaynes commented 6 years ago

Closing - fixed by #6