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

Chapter range patterns #454

Merged
merged 3 commits into from
Feb 16, 2023

Conversation

christoph-heinrich
Copy link
Contributor

@christoph-heinrich christoph-heinrich commented Feb 15, 2023

I've recently encountered a few videos with false positives for endings. Turns out it's because chapters ending with e.g. 'trending' would be detected as an ending. To fix that I've now applied the same pattern for 'ending' as was already used for 'ed'.

While doing that I've noticed that 'opening' and 'closing' were also the same way, so I've applied the same thing to them too, but since I've never actually noticed any problems with them, I've made it a separate commit. Also I don't know if having all three variants even makes sense for all of them.

This is a draft because I'm not sure about the change and it could certainly benefit from testing and discussion.

A collection of examples of what should and shouldn't be detected for each kind would take a lot of the guesswork out of such changes. I've prepared a table in a test file (not included here) to collect examples I encounter in the wild, let's see if that will ever become good enough to be useful.

@christoph-heinrich
Copy link
Contributor Author

I've gathered some examples from old discussions and local files and made some adjustments to make them pass.
It's debatable which of those should be hard coded or loaded from the config file, but I'll leave it hard coded for now (makes testing easier).

@tomasklaen
Copy link
Owner

Makes sense. No objections merging this as is.

@christoph-heinrich christoph-heinrich marked this pull request as ready for review February 16, 2023 17:58
@christoph-heinrich
Copy link
Contributor Author

I've opened it up for merging since you're fine with it as is, but I suspect that won't be the last time those patterns get touched.

If anyone runs into false positives/negatives, please let me know so I can expand my collection and (hopefully) fix it 😉

@tomasklaen tomasklaen merged commit 1dfbbd7 into tomasklaen:main Feb 16, 2023
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.

2 participants