Metadata-Version: 2.4
Name: altspell
Version: 0.1.0
Summary: A flask web API for translating between traditional English spellings and alternative spellings
Author-email: Nicholas Johnson <njohnson@posteo.net>
Requires-Python: >=3.8,<4
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Requires-Dist: altspell_plugins==0.1.0
Requires-Dist: dependency_injector==4.46.0
Requires-Dist: flask==3.1.0
Requires-Dist: flask_sqlalchemy==3.1.1
Requires-Dist: flask_cors==5.0.1
Requires-Dist: psycopg2==2.9.10
Requires-Dist: pytz==2025.1
Requires-Dist: requests==2.32.3

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

```sh
# 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:

```sh
# 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}
```

