Created
March 18, 2021 03:33
-
-
Save wfng92/509f8c83d366b3d7ef35f71caeaf751b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gcld3 | |
detector = gcld3.NNetLanguageIdentifier(min_num_bytes=0, max_num_bytes=1000) | |
sample = "Welcome to Medium." | |
result = detector.FindLanguage(text=sample) | |
print(result.language, result.is_reliable, result.proportion, result.probability) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment