
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@qvac/langdetect-text
Advanced tools
`@qvac/langdetect-text` is a language detection library for qvac. It provides an interface for detecting the language of a given text, returning either the single most likely language or the top K probable languages.
@qvac/langdetect-text is a language detection library for qvac. It provides an interface for detecting the language of a given text, returning either the single most likely language or the top K probable languages.
LangDetect provides a unified interface for detecting the language of a given text. It integrates seamlessly with other QVAC AI Runtime libraries and classes.
const LangDetect = require("@qvac/langdetect-text");
const langDetect = new LangDetect();
detectOne(text): Detects the most probable language of the given text.
const lang = langDetect.detectOne("This is a sample text.");
console.log(lang);
// Output: { code: 'en', language: 'English' }
detectMultiple(text, topK): Detects the topK probable languages of the given text in descending order of probability.
const langs = langDetect.detectMultiple("Hola, cómo estás?", 3);
// Output: [{ code: 'es', language: 'Spanish', probability: 0.7253999999999999 }, { code: 'la', language: 'Latin', probability: 0.07142857142857142 }, { code: 'pt', language: 'Portuguese', probability: 0.007935714285714284 }]
Below is an example of how LangDetect can be used to detect the language of a given text:
const LangDetect = require("@qvac/langdetect-text");
const langDetect = new LangDetect();
const text = "This is a sample text.";
const lang = langDetect.detectOne(text);
const langs = langDetect.detectMultiple(text, 3);
npm install
npm test
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
For any questions or issues, please open an issue on the GitHub repository.
FAQs
`@qvac/langdetect-text` is a language detection library for qvac. It provides an interface for detecting the language of a given text, returning either the single most likely language or the top K probable languages.
We found that @qvac/langdetect-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.