Skip to main content

A flask web API for translating between traditional English spellings and alternative spellings

Project description

Altspell

Flask web app for translating traditional English to respelled English and vice versa.

Quick Start

Execute the following commands to get the web API up and running:

# Activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install main program
pip install git+https://github.com/Inglish-Respelling-Project/altspell

# Install main program dependency
pip install git+https://github.com/Inglish-Respelling-Project/altspell-plugins

# Install a few plugins
pip install git+https://github.com/Inglish-Respelling-Project/altspell-lytspel  \
            git+https://github.com/Inglish-Respelling-Project/altspell-portul  \
            git+https://github.com/Inglish-Respelling-Project/altspell-universal-lojikl-inglish

# Install plugin dependency
pip install git+https://github.com/Inglish-Respelling-Project/nlp-provider

# Start web API
flask --app altspell run

Example HTTP requests:

# List available spelling systems
curl -X GET -H "Accept: application/json" http://127.0.0.1:5000/api/spelling-systems

# Perform forward translation and save the result in the database
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d  '{
    "text": "Hello, world!",
    "spellingSystem": "lytspel",
    "forward": true,
    "save": true
}' http://127.0.0.1:5000/api/translations

# Retrieve the saved result from the database
# translation_id comes from the HTTP response of the previous command
curl -X GET -H "Accept: application/json" http://127.0.0.1:5000/api/translations/{translation_id}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

altspell-0.1.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

altspell-0.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file altspell-0.1.0.tar.gz.

File metadata

  • Download URL: altspell-0.1.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for altspell-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e79fd788a00713c6b7c0dc669966faf1f9d0e6c5f00a6ccc86e489fe7eb871d
MD5 e1b1d5ef6ad544b04d1588023c1779c1
BLAKE2b-256 883de9ad966c315f285ce337c46e968bbd6be2d8d548ad38c60ffb7324597ada

See more details on using hashes here.

File details

Details for the file altspell-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: altspell-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for altspell-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7b1de33438745304cb50d58e72e387bbfcbd933a6186306359b154650d31770
MD5 f465f891bd4b4a82b02108b8058ef667
BLAKE2b-256 affe3be6c406f683131a26dc2de583fa847b7f40aacfa654e009f4e355e62cff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page