API reference
Text & hierarchy
A text is a lazily-built tree of linguistic entities over a syllable-level DataFrame.
| texts.texts.Text | |
| texts.texts.TextModel | A class that represents a text structure, comprised of WordTokens. |
| texts.stanzas.Stanza | A class representing a stanza in a poem or text. |
| texts.lines.Line | A class representing a line of text in a poem or prose. |
| words.wordtoken.WordToken | Represents a word token in text. |
| words.wordform.WordForm | Represents a specific form of a word. |
| words.syllables.Syllable | Represents a syllable in a word. |
| words.phonemes.Phoneme | Represents a phoneme with various attributes. |
Metrical parsing
The exhaustive, vectorized constraint-based parser and its MaxEnt weight learner.
| parsing.meter.Meter | A metrical parsing system using vectorized numpy constraint evaluation. |
| parsing.parses.Parse | Represents a metrical parse of a line of text. |
| parsing.maxent.MaxEntTrainer | Learns constraint weights from annotated scansion data. |
Poem-level analysis
Higher-order form classification over a parsed text (surfaced as TextModel properties).
| analysis.meter_type.classify_meter_type | Classify the dominant meter of a parsed text. |
| analysis.line_scheme.detect_line_scheme | Find the repeating template that best fits a sequence of line lengths. |
| analysis.rhyme_scheme.match_rhyme_scheme | Find the named rhyme scheme that best fits a sequence of rhyme IDs. |
| analysis.summary.summary | Render a tabular summary of metrical + rhyme annotations. |
| analysis.grid.grid_str | Render the grid as monospace text. |
Remote client
Duck-typed client for a Prosodic server (only requests required locally).
| client.set_server | Set the remote server for all subsequent Text() calls. |
| client.get_server | Get the current remote server (URL string or TestClient), or None. |
| client.RemoteText | Duck-types prosodic.texts.texts.TextModel. |