What would be a reasonable name for the function in the function repository (where all functions share a namespace)?
This is indeed a very interesting function, and it would be nice to have it.
It is clear now that it is specific to English and the implementation does not generalize to other languages in a straightforward manner (even the concept of WordData doesn't generalize well to an agglutinative language like Hungarian).
AnalyzeMeter
would be a nice name, but what name would other language implementations use?
AnalyzeEnglishMeter
is a bit too long and ugly for my taste ...
Would it make sense to split out the reusable parts, e.g. have a separate function that can take a line annotated with syllable boundaries and lengths, and visualize it? Then have a language specific function that takes a string and creates an annotated verse from it?
(I don't think it's a big deal even if it uses up a general name in this case, just thinking aloud ... as this is a more general issue with the function repo.)