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
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