Simple HTTP Server for translate texts and detect languages
Important
Minimum requirement Go 1.24.
-
Clone the repository
git clone https://github.com/twirapp/language-processor.git && cd language-processor
-
Download model Run this in the project root directory:
wget https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin
-
Install dependencies
go mod download
-
Run the server
go run cmd/main.go
You can pull the pre-built Docker image from Docker Hub:
docker pull twirapp/language-processor
And run it with the command:
docker run --rm -p 3012:3012 --name language-processor twirapp/language-processor
- Clone the repository
git clone https://github.com/twirapp/language-processor.git && cd language-processor
- Build the Docker image
docker build -t language-processor .
- Run the container
docker run --rm -p 3012:3012 --name language-processor language-processor
Create a docker-compose.yml
file with the following content:
services:
language-processor:
image: twirapp/language-processor
ports:
- "3012:3012"
Then run:
docker compose up -d