yoeo / guesslang

Detect the programming language of a source code
https://guesslang.readthedocs.io
MIT License
773 stars 110 forks source link

[feature request] return probability from language_name() #60

Closed nschloe closed 2 years ago

nschloe commented 2 years ago

language_name() returns the best guess for the language. I would like to know the associated probability such that I can decide if I use the information or not.

katlim-br commented 2 years ago

you should use then the .probabilities() method, and by your own threshold decide whether is good or not.

nschloe commented 2 years ago

Makes sense, thanks!