Metadata-Version: 2.1
Name: latin-scansion
Version: 0.1.1
Summary: Automated Latin scansion
Home-page: https://github.com/CUNY-CL/latin_scansion
Author: Jillian Chang, Kyle Gorman
Author-email: kylebgorman@gmail.com
License: Apache 2.0
Keywords: computational linguistics,natural language processing,phonology,phonetics,speech,language,Latin
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# 🏛️ Latin scansion engine 🏛️

[![Supported Python
versions](https://img.shields.io/pypi/pyversions/latin_scansion.svg)](https://pypi.org/project/latin_scansion)
[![CircleCI](https://circleci.com/gh/CUNY-CL/latin_scansion/tree/master.svg?style=svg)](https://circleci.com/gh/CUNY-CL/latin_scansion/tree/master)

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](LICENSE.txt) for details.

## Installation

[Conda](http://conda.io) 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`](latin_scansion/cli/scan.py) scans a document, generating a
    human-readable
    [textproto](https://medium.com/@nathantnorth/protocol-buffers-text-format-14e0584f70a5)
    representation of document's scansion. Sample usage:

        latin_scan --far grammars/all.far data/Aeneid/Aeneid01.txt data/Aeneid/Aeneid01.textproto

-   [`latin_validate`](latin_scansion/cli/validate.py) validates (and
    optionally, canonicalizes) a textproto document scansion. Sample usage:

        latin_validate data/Aeneid/Aeneid01.textproto

## Testing

Run:

    pytest tests

## Authors

-   [Jillian Chang](jillianchang15@gmail.com)
-   [Kyle Gorman](kgorman@gc.cuny.edu)

