A tool to detecting the language for a small piece of unicode text without any dependency to other libraries. #Language detector #Unicode text #Language #Detector #Unicode #Text
lang-detect is a Python tool to detect language.
Detecting the language for a small piece of unicode text without any dependency to other libraries.
Currently we support detecting de, en, es, fr, it, ja, nl, pl, ru, zh-hans, zh-hant, and zh-yue.
After some simple testing, we found that the result for long sentence is better.
We focus on the Basic Multilingual Plane in unicode encoding, and current language support set could be extended.
For each language, we use a uniformed ngram vector to represent the language itself. This vector can be seen at the data folder.
When we detect a text, we generate the uniformed ngram vector for this text, and just comparing the cosine value of the angle between the text vector and the language vector.
To get the language vector, we use feature articles on Wikipedia as corpus.
cd to the project root
bin/langdetect YOUR_SENTENCE_HERE
System requirements
lang-detect 0.0.1
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- main category:
- Utilities
- developer:
- visit homepage
Windows Sandbox Launcher 1.0.0
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
Bitdefender Antivirus Free 27.0.35.146
IrfanView 4.67
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
7-Zip 23.01 / 24.04 Beta
Zoom Client 6.0.0.37205
calibre 7.9.0
ShareX 16.0.1
paint.net 5.0.13 (5.13.8830.42291)
- calibre
- ShareX
- paint.net
- Windows Sandbox Launcher
- Microsoft Teams
- Bitdefender Antivirus Free
- IrfanView
- 4k Video Downloader
- 7-Zip
- Zoom Client