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

support language name detect #19

Open
Joungkyun opened this issue May 24, 2021 · 0 comments
Open

support language name detect #19

Joungkyun opened this issue May 24, 2021 · 0 comments
Assignees
Milestone

Comments

@Joungkyun
Copy link
Owner

From python chardet 3.x, it support the name of detectd language.

usock = urlopen(url)
detector = UniversalDetector()
detector.reset ()
for line in usock.readlines():
    detector.feed(line)
    if detector.done: break
detector.close()
usock.close()
print (detector.result)

results are follows:

{'encoding': 'MacCyrillic', 'confidence': 0.33487987945663855, 'language': 'Russian'}
@Joungkyun Joungkyun added this to the 1.0.7 milestone May 24, 2021
@Joungkyun Joungkyun self-assigned this May 24, 2021
@Joungkyun Joungkyun changed the title add language name detect support language name detect May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant