Skip to main content

Seq2seq model with attention for automatic orthographic simplification

Project description

ortografix

GitHub release PyPI release Build MIT License

Welcome to ortografix, a seq2seq model for automatic ortografic simplification, coded with pytorch 1.4.

Install

via pip:

pip3 install ortografix

or, after a git clone:

python3 setup.py install

Train

To train a model, run:

ortografix train \
--data /abs/path/to/training/data \
--model-type gru \
--shuffle \
--hidden-size 256 \
--num-layers 1 \
--bias \
--dropout 0 \
--learning-rate 0.01 \
--epochs 10 \
--print-every 100 \
--use-teacher-forcing \
--teacher-forcing-ratio 0.5 \
--output-dirpath /abs/path/to/output/directory/whereto/save/model \
--with-attention \
--character-based

Test

To (qualitatively) evaluate the output of training on a set of 10 randomly selected sentences, run:

ortografix evaluate \
--data /abs/path/to/test/data \
--model /abs/path/to/model/directory/ \
--random 10

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

ortografix-0.2.0.tar.gz (11.8 kB view hashes)

Uploaded Source

Supported by

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