Skip to content

dothq/lexicon

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Dot Lexicon

🌐 A microservice for quick and local translation using A.I.


This service starts a local webserver used for neural machine translation.

🚀 Features

Dot Lexicon
🔒 No tracking or telemetry data is collected from you
🆓 Always free
⚡️ Fast on low-compute machines
📝 Accurate and keeps your prompt meaningful
💻 Open-source and open for contributions

For inference, all models are ran on the CPU. Every model utilized in this service are 8-bit quantized, which results in decreased latency and storage costs.

📦️ Setup

Note: after setup.py is executed, 5GB will be used.

Docker will take ~16GB in total.

# Clone the repository:
git clone https://github.com/dothq/lexicon.git
cd lexicon/

# Build Dockerfile
sudo docker build -t translate .

Run the container with sudo docker run -d -p 3000:3000 translate

The default authorization key is universal

Continue without docker:

Install required dependencies:

# Install requirements
pip3 install -r requirements.txt
cd lexicon/

# Download all the available models:
python3 setup.py

# Launch the server
python3 application.py

Your API is then available for use via POST to /translate (port 3000) using JSON:
Header: Authorization: Bearer TOKEN (default key universal)

{
  "from": "en",
  "to": "es",
  "input": "This is a test translation using Dot Lexicon!"
}

Response will be in JSON.

🔧 Contributing

We accept all positive contributions that affects this repository and service as a whole; we accept trained .argosmodels files via pull request.

Our models: (These will automatically be installed on setup via latest.json)

Language Source -> Target Target -> Source
🇳🇱 nl -> en en -> nl
🏴󠁧󠁢󠁷󠁬󠁳󠁿 en -> cy cy -> en

❤️ Acknowledgements

Argos Translate, which is built on OpenNMT, is widely used in this repository for translation.

📜 Licenses

Dot Lexicon is licensed under the MIT license.