Skip to main content

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

Qualitative evaluation

To qualitatively evaluate the output of the model on a set of 10 randomly selected sentences from a given dev/test set, run:

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

Quantitative evaluation

To quantitatively evaluate the output of the model on a given dev/test set, run:

ortografix evaluate \
--data /abs/path/to/test/data.txt \
--model /abs/path/to/model/directory

Quantitative evaluation will return:

  1. The sum of all edit (Levenshtein) distance computed across all test pairs
  2. The average edit distance computed across all test pairs
  3. The average normalized edit distance
  4. The average normalized edit similarity

All measure are computed via textdistance.

Metadata

Release files for ortografix 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ortografix 0.7.0
File Size Uploaded
ortografix-0.7.0.tar.gz 14.6 kB Details

Release files / ortografix-0.7.0.tar.gz

Download URL ortografix-0.7.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
48206504d4663b9523b7b4ee86a46f3dbaa52b175c402ab294b7764e92a65a2c
BLAKE2b-256 checksum
How to use checksums
521ca3cbef91ba292b1bece360c389e16ca7b0c0f7b299a670b94c07787db531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.7.0 This release

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page