Skip to main content

Automated Latin scansion

Project description

🏛️ Latin scansion engine 🏛️

Supported Python versions CircleCI

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

  1. Compile the grammar assets:

    make -j -C grammars
    
  2. Generate the textproto library:

    make -C latin_scansion
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

latin_scansion-0.1.1.tar.gz (17.0 kB view details)

Uploaded Source

File details

Details for the file latin_scansion-0.1.1.tar.gz.

File metadata

  • Download URL: latin_scansion-0.1.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for latin_scansion-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1367133778a2c189977854418b06eb4e2f90246c04f1f69c18cbf5193a544cfc
MD5 96ce5be30983133e703e2f5f0b9c5402
BLAKE2b-256 dcc8f1c444ff4200a6dc089f04cbf36d0f449250d5428343ad6c1e00581f0a52

See more details on using hashes here.

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