Gist 4e556c8ccbb579e82ba9
✓ Published0🌍 Public
TTylerKirby
Last edited Aug 4, 2015
Created on Aug 4, 2015
This visualization scans Greek prose and poetry to produce a prosimetric scansion, showing syllable lengths (long or short) across sentences. It first cleans and tokenizes the text using the Classical Language Toolkit’s `TokenizeSentence` and NLTK’s `PunktLanguageVars`, then syllabifies and applies Greek metrical rules such as diphthongs, long vowels, and consonant clusters. The code defines a `Scansion` class with methods like `_long_by_nature` to classify syllables, ultimately outputting the metrical pattern for each line of the input text.
AI-generated description