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

S2, W2 partial matching redundancy #15

Open
DavidGarfinkle opened this issue Jun 9, 2017 · 0 comments
Open

S2, W2 partial matching redundancy #15

DavidGarfinkle opened this issue Jun 9, 2017 · 0 comments

Comments

@DavidGarfinkle
Copy link
Collaborator

DavidGarfinkle commented Jun 9, 2017

Also related to #12 if P2 starts to support multiple chains.

Since each algorithm is a generator and builds up occurrences as they find them, if there exists a full occurrence of the pattern but settings['mismatches'] > 0, S2 and W2 will find all combinations of mismatches within it.

e.g. 'ACE' is the pattern, with an identical source 'ACE'. We use S2 or W2 with threshold = 2 rather than 3
then they will find 'AC', 'AE", 'CE', and 'ACE'. This makes using partial matching frustrating with excerpt output, where each occurrence gets its own xml file, since a lot of the results are redundant.

Currently I workaround by finding all occurrences at once and colouring them in one big score (but this defeats the purpose of having generators in the first place). If we want interactive excerpt output in javascript, then this should be fixed

Option 1) is to try to identify related occurrences by tagging them before they're yielded in the algorithm. Option 2) is to process them after being yielded and filter them based on their shared notes.
But the whole point of having multiple chains is to see the combinations of voices that a query can cross through, so I'm a little confused how to fix the redundancy but retain the desired behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant