
Product
A New Overview in our Dashboard
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
a tool to detecting the language for a small piece of unicode text without any dependency to other libraries.
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
FAQs
a tool to detecting the language for a small piece of unicode text without any dependency to other libraries.
We found that lang-detect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.