frietkot
frietkot

Reputation: 911

Identifying (spoken) language in javascript

Does anyone know if there is any language detection script/library available for javascript? I like to incorporate it into nodejs but didn't found any.

I don't want a browser language detection but a string language detection. 'Hello World' would be detected english and 'Hallo Wereld' would be detected as dutch.

Thanks in advance.

Upvotes: 3

Views: 2016

Answers (2)

Ivo Wetzel
Ivo Wetzel

Reputation: 46756

I'm not that big into natural language processing but I suppose you could use Trigrams.

ActiveState has a Recipe of a simple Python version.

Of course you can always use a C++ library and write a wrapper for Node.js and compile that.

Upvotes: 2

White Elephant
White Elephant

Reputation: 1381

The Google Translate API allows language detection and works with JavaScript. You should check out the reference below:

http://code.google.com/apis/language/translate/v1/reference.html

Upvotes: 1

Related Questions