Automated 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
-
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
Built Distribution
File details
Details for the file latin_scansion-0.1.3.tar.gz
.
File metadata
- Download URL: latin_scansion-0.1.3.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20daac188bdce302830771c83ee0f849dedeb541fe1fa51ebddbf64b4ffc45ea |
|
MD5 | 63a63241e97c41a16ad2bb11c8c39339 |
|
BLAKE2b-256 | 889763d37e8b88f8f00eb10fa9651d03b9e56e6e46a23674bfe3bcfc75b8567d |
File details
Details for the file latin_scansion-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: latin_scansion-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbf7bc3f7cd0a7868dc73c2393210dfc87106a15cba26ed9034ac82d41ef759f |
|
MD5 | 0f336d1d5348bf64b5a8b9c3e6724e2c |
|
BLAKE2b-256 | b0221478fd5a19d9911bdb0e7e3f79869504faa10b894e9499071271c926c1a7 |