You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.
I made a few experiments to find out what would be the result of detection for some text not in the supported languages list. While it appears that whatever is detected is unreliable so I can reject the detection, I stumbled upon an example where the result is unexpectedly bad
importgcld3detector=gcld3.NNetLanguageIdentifier(min_num_bytes=0, max_num_bytes=1000)
sample="The last part of this text is pure gibberish with well crafted punctuation. Този текст е на Български. Sdslkmnscd scsun dc mcsaducsdnmlmc icmmklmdsc!"result=detector.FindTopNMostFreqLangs(text=sample, num_langs=5)
foriinresult:
print(i.language, i.is_reliable, i.proportion, i.probability)```
willsurprisinglyoutputthis:
`enTrue0.44444444775581360.9999370574951172bgTrue0.280701756477355960.9173890948295593huTrue0.274853795766830440.9084945917129517undFalse0.00.0undFalse0.00.0`
foronepartgoodtextandsecondpartgarbageitdependswhichisfirstandwhichhasbiggerproportionbuttheresultcanbecorrectlyinterpreted, howevertheaboveexampleisquitebad.
The text was updated successfully, but these errors were encountered:
rvencu
changed the title
Did I hit a bug in gcld3
Did I hit a bug in gcld3?
Nov 3, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I made a few experiments to find out what would be the result of detection for some text not in the supported languages list. While it appears that whatever is detected is unreliable so I can reject the detection, I stumbled upon an example where the result is unexpectedly bad
The text was updated successfully, but these errors were encountered: