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

Fix missing pitches in neume ngrams + refactorings #913

Merged
merged 7 commits into from
Oct 4, 2024

Conversation

dchiller
Copy link
Collaborator

@dchiller dchiller commented Sep 23, 2024

This PR makes a number of relatively minor changes.

  • admin.py: adds missing type annotations, modifies field groups for the Manuscript admin page, modifies the listed fields for neume exemplars
  • Uses hyphens rather than underscores between words in multi-word neume names. We use underscores to delimit neume names, so this allows us to disambiguate between two words that represent two neume names (e.g. "punctum_clivis") and two words that name a single neume (e.g. "scandicus-flexus"). Makes updates to tests, views, and other modules that make use of neume names to reflext this change.
  • moves neume types and related data structures to their own helpers file. Since these are used across the application, it made more sense to me to import them from a central file rather than having these lists and dictionaries spread across multiple files
  • makes the location of test mei files into a setting configured in settings.py rather than separately in every test file where test mei files are used

It also closes #910. Previously, neume ngrams (as opposed to pitch ngrams) did not include all the pitches contained in the final neume in the ngram. This PR adjusts the logic of the MEITokenizer (adding pitches to the ngram until the start of the n+1th neume is reached) to address this issue.

Replaces underscores with hyphens to delimit words in multiword
neume names. This disambiguates situation where we had been using
underscores to delimit neume names and words within multiword neume
names.
Neume types, mappings, and UI ordering are used across multiple modules.
Their own helper module is a better location than within the MEI parsing
helper module.

Updates some type annotations and typing-related dependencies in the process.
…name hyphens

refs: 9ff400c83a9feea0e78fccdde408d55c61d57199
Fixes the logic governing the creation of ngrams of neumes in the
MEITokenizer class so that an ngram document containing multiple complete
neumes contains all of the pitches contained within those neumes.

Adds a new test to the MEITokenizer test class that ensures that
the number of pitches in an ngram agrees with the number of pitches
suggested by the neume names in the ngram.
Moves the TEST_MEI_FILES_PATH setting to settings.py rather than
setting it separately for each test.

Makes some changes to test set-up and break-down to remove the need to index
MEI before each test.
@dchiller
Copy link
Collaborator Author

dchiller commented Oct 4, 2024

@lucasmarchd01 could you review?

@lucasmarchd01
Copy link
Contributor

Yup sorry I missed this one!

Copy link
Contributor

@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.

Looks good to me!

@dchiller dchiller merged commit 1be46da into DDMAL:main Oct 4, 2024
2 checks passed
@dchiller dchiller deleted the i910-compound-neumes branch October 4, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Compound" neumes are incorrectly labeled by the MEI parser
2 participants