🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
g

guesslanguage

Guess the natural language of a run of text

0.2.0
latest
73

Supply Chain Security

100

Vulnerability

83

Quality

76

Maintenance

70

License

Misc. License Issues

License

(Experimental) A package's licensing information has fine-grained problems.

Found 1 instance in 1 package

Non-existent author

Supply chain risk

The package was published by an npm account that no longer exists.

Found 1 instance in 1 package

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Dependencies have 4 high and critical alerts.

Critical CVE and High CVE

Version published
Weekly downloads
331
36.21%
Maintainers
1
Weekly downloads
 
Created
Issues
12

guessLanguage.js

A JavaScript language detection library based on trigram statistical analysis. This library works equally well when run in either the Browser or Node.js.

Usage

You can clone this repo as follows:

git clone git@github.com:richtr/guessLanguage.js.git

You can use this library in a web page as follows:

<script src="lib/_languageData.js"></script>
<script src="lib/guessLanguage.js"></script>
<script>
  guessLanguage.detect('...input text here...', function(language) {
    console.log('Detected language of provided text is [' + language + ']');
  });
</script>

You can use this library in a Node.js project. This library is available as an npm package:

sudo npm install -g guesslanguage

Using this library in a Node.js project can be done as follows:

var guessLanguage = require('./lib/guessLanguage');

guessLanguage.detect('...input text here...', function(language) {
  console.log('Detected language of provided text is [' + language + ']');
});

Feedback

Please note this library is in the early stages of development. If you find any bugs or issues please file them on this project and I'll take a look.

Please also feel free to catch me on Twitter @richtibbett.

FAQs

Package last updated on 21 Oct 2012

Did you know?

Socket

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.

Install

Related posts