Automatd Latin scansion
Project description
🏛️ Latin scansion engine 🏛️
This library uses finite-state grammars to automate Latin scansion, with an initial focus on the dactylic hexameters of Virgil.
License
The engine is released under an Apache 2.0 license. Please see LICENSE.txt for details.
Installation
Conda is recommended for a reproducible environment. Assuming
that Conda (either Miniconda or Anaconda) is available, the following command
creates the environment scansion
.
conda env create -f environment.yml
This only needs to be done once. The following command then activates the environment.
conda activate scansion
This second step needs to be repeated each time you start a new shell.
Installation
-
Compile the grammar assets:
make -j -C grammars
-
Generate the textproto library:
make -C latin_scansion/lib
-
Install the Python library:
pip install -e .
Command-line tools
Installation produces two command-line tools:
-
latin_scan
scans a document, generating a human-readable textproto representation of document's scansion. Sample usage:latin_scan --far grammars/all.far data/Aeneid/Aeneid01.txt data/Aeneid/Aeneid01.textproto
-
latin_validate
validates (and optionally, canonicalizes) a textproto document scansion. Sample usage:latin_validate data/Aeneid/Aeneid01.textproto
Testing
Run:
pytest tests
Authors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file latin_scansion-0.1.0.tar.gz
.
File metadata
- Download URL: latin_scansion-0.1.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea03ad28574d9efee46c3101a771c799cd525cf2cc61285b74528092085c4924 |
|
MD5 | 0bcccf4cabf38b2bd79750cd38cb3556 |
|
BLAKE2b-256 | 8228a92a1220c074d03f158e170bd1b4355ab54ba0826cc76929dd9315c52815 |