Skip to content
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

Handle issues when improper characters are passed to latin word syllabifier #52

Merged
merged 3 commits into from
May 27, 2024

Conversation

dchiller
Copy link
Collaborator

@dchiller dchiller commented Apr 22, 2024

This PR:

  • Introduces LatinError, and exception that inherits from ValueError, to specifically identify errors where a latin word passed to the syllabification script has improper characters. This is intended to allow applications using this utility to handle these exceptions as appropriate.
  • Introduces some logic in cantus_text_syllabification.syllabify_text that adds spacing to improperly space instances of hash (#)
  • Cleans up a number of typing issues.

Closes #48 and closes #49 for the purposes of this repository.

Opened DDMAL/CantusDB#1423 for CantusDB to handle LatinError

Return flag when hash respacing occurs

Adjusts some typing in tests/tests.py
@dchiller dchiller force-pushed the i48-square-bracket-error branch from a31c30e to 694c735 Compare April 22, 2024 14:59
@jacobdgm
Copy link
Collaborator

I think it is charming and wonderful that CantusDB will soon have try:; ...; except LatinError:; ... blocks. :)

@dchiller
Copy link
Collaborator Author

@lucasmarchd01 Got an email from Debra just now upping the priority on this. Can you review on Monday?

Copy link
Collaborator

@lucasmarchd01 lucasmarchd01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, looks okay to me!

@dchiller dchiller merged commit 862a695 into main May 27, 2024
1 check passed
@dchiller dchiller deleted the i48-square-bracket-error branch May 27, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants