-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logic to handle missing section breaks in text and volpiano #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left comments on a few topics. the most substantive ones:
- readability could be improved if you wrote standalone functions for various flattening tasks, rather than doing them imperatively where they come up in your functions
- I've not tried applying this in any code I've written before, but there are several places where custom type aliases could make your type annotations much clearer/simpler. (I think type aliases is the right term: https://docs.python.org/3/library/typing.html#typing.TypeAlias)
- I don't fully understand why the
_infer_barlines
function works the way it does.
Harmonizes handling of consecutive missing music sections in text and volpiano. Reverts a previous change that combined consecutive texts sections associated with missing music into a single section, but subsequent review of the volpiano protocols and currently-existing texts in Cantus DB suggests that they are encoded as separate sections (ie. with multiple missing music markers)
…ines Rather than raising an error when text and volpiano have different numbers of sections but the same number of barlines, we just pad the shorter of the two (text or volpiano) with additional "empty" sections.
The commit 0809ac9 has been tested with every chant that has both volpiano and full text manuscript spelling in Cantus DB. Only 12 chants fail to align, and all contain significant encoding errors. Those chants are: 493596 - Only clef encoded |
Rename and simplify TypeVar. Rename functions for clarity.
Just commenting that these 12 problem chants SHOULD all now be fixed (and free of many other proofreading errors besides!). |
Excellent! |
This PR:
_infer_barlines
to infer barlines in text or volpiano in cases where there is a mismatch in the number of sections in either stringCloses #4, Closes #27, Closes #28, Closes #29