calliope-ts 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Calliope TS
1
+ # Calliope TS 0.0.4
2
2
 
3
3
  **Calliope TS** is a phonological poetry-scansion toolkit for TypeScript / Node.js. Hand it a poem (or a single line), and it will tell you — and *show* you — how that verse actually moves: which syllables carry weight and how much, where the beats fall, what meter each line is in and how confidently, what rhymes with what, and what form the stanzas add up to.
4
4
 
@@ -79,11 +79,15 @@ cat poem.txt | calliope-ts --reading
79
79
 
80
80
  # 5. Interactive menu (run without typing arguments in a terminal each time)
81
81
  calliope-ts
82
+
83
+ # 6. Run the alternative "Clio" parse (powered by the legacy FinNLP suite)
84
+ calliope-ts --clio poem.txt
82
85
  ```
83
86
 
84
87
  The interactive menu offers: multi-line paste-and-scan (reading view),
85
88
  single-line detailed analysis, line-by-line analysis, file input in either
86
- view, and a **legend** explaining every symbol and colour.
89
+ view, a **legend** explaining every symbol and colour, and an option to
90
+ "Ask Clio instead" for the alternative parse.
87
91
 
88
92
  There are two display modes:
89
93
 
@@ -168,7 +172,7 @@ Bruce Hayes himself (2005) and Gareth McAleese (2007/2008) built the first faith
168
172
  The current pipeline has eight stages.
169
173
 
170
174
  **1. Grammatical parsing.**
171
- The line is tokenized, part-of-speech tagged, and dependency-parsed — that is, the engine works out which word grammatically governs which (subject of what verb, object of what preposition) — using the FinNLP family of libraries (`lexed`, `en-pos`, `en-parse`). Two correction layers sit inside this stage,
175
+ The line is tokenized, part-of-speech tagged, and dependency-parsed — that is, the engine works out which word grammatically governs which (subject of what verb, object of what preposition) — using `udpipe-node` (our Node/JS/WASM port of UDPipe), now generating Universal Dependencies (UD) trees and morphological features. (For legacy comparison, the toolkit's built-in "Clio" alternate mechanics persist in using the FinNLP family of libraries (`lexed`, `en-pos`, `en-parse`) instead). A conversion layer seamlessly translates UD tags into the Penn Treebank tags our prosody expects. Two correction layers sit inside this stage,
172
176
  First, because poetry tends to break part-of-speech and grammatical dependency taggers in predictable ways, a *tag-repair* pass fixes systematic errors before the dependency tree is built (this appropriately accounts for rare exotics and awkward/shifty commonplaces alike: from archaic forms like *thou/thy/doth/wherefore*, to the pronoun *I*, to perfect-tense participles like *had quit*).
173
177
  Then we leverage a *tree-repair* pass (using the [depedits](https://www.npmjs.com/package/depedits) rule engine, our TypeScript port of the DepEdit library, originally in Python), which fixes systematic phrasal role attachment errors (e.g. noun compounds parsed as double objects, and the like). Hyphenated compounds and contractions (like *we'll*, *don't*, archaic *fix'd*, etc) are re-merged into single metrical words.
174
178
 
@@ -209,6 +213,10 @@ import {
209
213
  analyzeStanzas, // poem text → LineResult[][] (per stanza, per line)
210
214
  analyzeText, // poem text → LineResult[] (flat)
211
215
  analyzeReadingDocument, // poem text → ReadingStanza[] (keeps verbatim lines)
216
+ // The legacy/alternate "Clio" engine equivalents (using FinNLP):
217
+ analyzeStanzasClio,
218
+ analyzeTextClio,
219
+ analyzeReadingDocumentClio,
212
220
  } from 'calliope-ts';
213
221
  ```
214
222
 
@@ -352,7 +360,7 @@ Calliope TS is developed by **Aleksey Calvin** / [SilverAgePoets.com](https://ww
352
360
  ---
353
361
 
354
362
  **Limitations to know about.**
355
- - English only (the dictionary and parser are English; other languages will produce nonsense rather than errors).
363
+ - English only (the dictionary and phonological rules are English; while the UDPipe backend natively supports multilingual parsing, other languages will produce nonsense rather than errors).
356
364
  - Stress-doublet words (*rebel*, *content*, names like *Hugo*) are read with their dictionary stress; a correction is on the roadmap.
357
365
  - Rare or foreign proper names fall back to rule-based stress guesses.
358
366
 
@@ -374,8 +382,22 @@ node trials/corpus_benchmark.mjs # litlab / prosodic / epg64 meter corpora
374
382
 
375
383
  ## License and credits
376
384
 
377
- Apache-2.0. © Aleksey Calvin Tsukanov / SilverAgePoets.com.
378
- My email: alekseycalvin@gmail.com
379
-
380
- Methodological and conceptual debts: Bruce Hayes (1982/1984/1995/1996 with Abigail Kaun/2005) (the phonological scansion procedure as such, extrametricality insights, text-setting methodologies, MaxEnt OT, and who knows what else), Gareth McAleese (for a single 2008 paper, for detailing the original Calliope implementation, for exhibiting a remarkable field-spanning purview, an uncanny industriousness, and an uncommon – perhaps a tad obsessive – dedication to testing, refining, fusing, and extending all sorts of methodologies in a single-minded pursuit of bringing constraint-based computational scansion far beyond the best documented practices and results at that time; and for so obviously succeeding, if only to seemingly vanish from the field as abruptly and unreservedly as he entered and absorbed it*); Charles O. Hartman (Scandroid); Claire Moore Cantwell (morphological/phonological tagging algorithms), Austin Pursley (implementing finer-grained rhyme-matching heuristics over a corpus), Allison Parrish (Pronouncing-py and being a real life computational poet hero), Derek Attridge (beat/offbeat rhythm theory and insightful writings on the English dolnik); M. L. Gasparov (dolnik/taktovik taxonomy); the compilers of the CMU Pronouncing Dictionary; the makers of Prosodic (Heuser et al, for establishing an admirable state-of-the-art to compare against, differentiate from, and hopefully surpass in due time, in select ways), as well as broader generative-metrics, constraint-based metrics, and OT traditions, including Kiparsky, Prince & Smolensky, Groves, Blumenfeld, Lilja, Chomsky & Halle, Fabb & Halle (rule-based grid scansion theory), Einarsson (Metremic theory), Russom (Universalist metrics), K. M. Ryan (gradient syllable weight), big daddy Jakobson who had once roped the whole world with subtle strings and often hung out with Mayakovsky, and many others.
385
+ Apache-2.0. © Aleksey Calvin Tsukanov / SilverAgePoets.com. <br>
386
+ My email: alekseycalvin@gmail.com <br>
387
+
388
+ Methodological and conceptual debts:
389
+ - Michael Wagner (Prosody and Recursion, MIT, 2005) (for further clarifying the inter-relational nuances of prosody and syntax).
390
+ - Manfred Krifka (2001/2002) (for so poignantly elucidating NSR and CSR beyond SPE).
391
+ - Bruce Hayes (1982/1984/1995/1996 with Abigail Kaun/2005) (the phonological scansion procedure as such, extrametricality insights, text-setting methodologies, MaxEnt OT, and who knows what else);
392
+ - Gareth McAleese (for a single 2008 paper, for detailing the original Calliope implementation, for exhibiting a remarkable field-spanning purview, an uncanny industriousness, and an uncommon – perhaps a tad obsessive – dedication to testing, refining, fusing, and extending all sorts of methodologies in a single-minded pursuit of bringing constraint-based computational scansion far beyond the best documented practices and results at that time; and for so obviously succeeding, if only to seemingly vanish from the field as abruptly and unreservedly as he entered and absorbed it*);
393
+ - Charles O. Hartman (Scandroid);
394
+ - Claire Moore Cantwell (morphological/phonological tagging algorithms),
395
+ - Austin Pursley (implementing finer-grained rhyme-matching heuristics over a corpus),
396
+ - Allison Parrish (Pronouncing-py and being a real life computational poet hero),
397
+ - Derek Attridge (beat/offbeat rhythm theory and insightful writings on the English dolnik);
398
+ - M. L. Gasparov (dolnik/taktovik taxonomy);
399
+ - the compilers of the CMU Pronouncing Dictionary;
400
+ - the makers of Prosodic (Heuser et al, for establishing an admirable state-of-the-art to compare against, differentiate from, and hopefully surpass in due time, in select ways),
401
+ - Milan Straka and the UDPipe project (for the robust neural parsing architecture now driving the core mechanics),
402
+ - as well as broader generative-metrics, constraint-based metrics, and OT traditions, including Kiparsky, Prince & Smolensky, Groves, Blumenfeld, Lilja, Chomsky & Halle, Fabb & Halle (rule-based grid scansion theory), Einarsson (Metremic theory), Russom (Universalist metrics), K. M. Ryan (gradient syllable weight), big daddy Jakobson who had once roped the whole world with subtle strings and often hung out with Mayakovsky, and many others. <br>
381
403
  *Gareth McAleese: If you're reading this, please do email me!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "calliope-ts",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "A phonological poetry scansion and analysis framework in TypeScript, extrapolating from the works & thought of G. McAleese (2008), M. Wagner (2005), B. Hayes, the makers of Scandroid (2005), and many others. With syntactic dependency parsing and further phrasal NLP via udpipe-node, our js/WASM conversion of UDPipe, plus deep phono/morphological analysis word-by-word using our Nounsing Pro kit.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "en-pos": "^1.0.13",
52
52
  "finnlp": "^1.0.0",
53
53
  "lexed": "^1.0.10",
54
- "nounsing-pro": "0.0.8",
54
+ "nounsing-pro": "0.0.9",
55
55
  "udpipe-node": "0.3.0"
56
56
  },
57
57
  "devDependencies": {