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

Thêm tính năng nhận diện ngôn ngữ #233

Closed
rain1024 opened this issue Mar 13, 2019 · 3 comments
Closed

Thêm tính năng nhận diện ngôn ngữ #233

rain1024 opened this issue Mar 13, 2019 · 3 comments
Labels
feature A request for a proper, new feature.

Comments

@rain1024
Copy link
Contributor

rain1024 commented Mar 13, 2019

Thêm tính năng nhận diện ngôn ngữ

Đề xuất

from underthesea import lang_detect

lang_detect("Toàn cảnh con đường dọc sông Tô Lịch chỉ để đi bộ, đi xe đạp")
# vi

lang_detect("The college admissions scandal is more proof that helicopter parenting hurts kids")
# en
@rain1024 rain1024 added the feature A request for a proper, new feature. label Mar 13, 2019
@rain1024 rain1024 changed the title Thêm tính năng phát hiện ngôn ngữ Thêm tính năng nhận diện ngôn ngữ Mar 13, 2019
@kienvht
Copy link

kienvht commented Mar 28, 2019

Với những câu có cả tiếng anh và việt (nhập nhằng) thì sẽ detect như nào hả anh. Ví dụ vài câu bóng đá:
Cầu thủ David Degea hiện đang thi đấu cho câu lạc bộ Manchester United.

@rain1024
Copy link
Contributor Author

@kienvht Cái đấy anh cũng chưa biết. Có 2 lựa chọn (1) Đầu ra là ngôn ngữ xuất hiện nhiều nhất trong câu (2) Tất cả các ngôn ngữ xuất hiện trong câu

Nếu theo (1) thì kết quả của câu trên là vi
Nếu theo (2) thì kết quả của câu trên là vi, en

Em nghĩ sao?

@rain1024 rain1024 mentioned this issue May 8, 2019
16 tasks
rain1024 added a commit that referenced this issue Jun 15, 2019
@rain1024 rain1024 mentioned this issue Apr 26, 2020
12 tasks
@rain1024 rain1024 mentioned this issue Jan 1, 2023
4 tasks
rain1024 added a commit that referenced this issue Jun 8, 2024
@rain1024 rain1024 mentioned this issue Jun 8, 2024
4 tasks
@rain1024
Copy link
Contributor Author

rain1024 commented Jun 9, 2024

Starting from underthesea version 7.0.0, we support this feature.

You can now use the lang_detect function from underthesea:

>>> from underthesea import lang_detect

>>> lang_detect("Cựu binh Mỹ trả nhật ký nhẹ lòng khi thấy cuộc sống hòa bình tại Việt Nam")
vi

@rain1024 rain1024 closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A request for a proper, new feature.
Projects
None yet
Development

No branches or pull requests

2 participants