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 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