Detect a lang from a string in NodeJS.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
public
.coveralls.yml
.dockerignore
.gitignore
.travis.yml
Dockerfile
Procfile
README.md
app.js
app.json
package.json

README.md

travis Coverage Status

Detect Lang Server

Detect a lang from a string in NodeJS.

The script is a NodeJS API using a node module called Franc to detect toot language, he return a JSON array.

Endpoint

Endpoint Purpose Data? Get/Post/Delete
/lang/{phrase} Get lang detected {"lang": "ISO FORMAT LANG"} GET

Install

git init
git clone https://github.com/arthurlacoste/detect-lang-server
cd detect-lang-server
npm install
node app

Install on Docker

docker build -t art/detect-lang-server github.com/arthurlacoste/detect-lang-server
docker run -p 8080:1337 -d art/detect-lang-server

Demo here

Main project

This nodeJS server is a part of Mastodon Lang Remover, but you can run it for your own needs.

Changelog

1.0.0

  • Using Franc instead of Google Translate API

0.1.1

  • Initial commit