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

fixes to --preserve-punctuation #119

Merged
merged 4 commits into from Apr 15, 2022

Conversation

jncasey
Copy link
Collaborator

@jncasey jncasey commented Apr 5, 2022

This reworks a few things related to preserving punctuation.

A number of the tests had to be updated due to that first bullet point.

@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #119 (d2e5726) into master (d9315b9) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #119   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1152      1168   +16     
=========================================
+ Hits          1152      1168   +16     
Impacted Files Coverage Δ
phonemizer/backend/base.py 100.00% <100.00%> (ø)
phonemizer/backend/espeak/espeak.py 100.00% <100.00%> (ø)
phonemizer/punctuation.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9315b9...d2e5726. Read the comment docs.

@jncasey
Copy link
Collaborator Author

jncasey commented Apr 12, 2022

@hadware I think this is good to go, but it definitely changes the output when preserving punctuation compared to previous versions of phonemizer. This way seems much more consistent to me – the output will have the same number of word separators whether punctuation is being preserved or not.

See the tests I modified for examples of the new output.

@hadware
Copy link
Collaborator

hadware commented Apr 14, 2022

Alright, super cool.

I'll review the PR probably tomorrow, and hopefully we can merge this. This is fantastic, thanks again for your work!

@jncasey
Copy link
Collaborator Author

jncasey commented Apr 14, 2022

Great! Let me know if you need me to make any changes.

And thank you for this project. It's replaced my DIY solution of a transformers model trained on the CMUDict, and is so much faster and more accurate.

@hadware
Copy link
Collaborator

hadware commented Apr 15, 2022

This is looking good! I'm merging this. I'd like to add a test with the large e-book from #108 , then i'll release a new version (Probably 3.2.1 since this contains some pretty major changes)

@hadware hadware merged commit 87e5d65 into bootphon:master Apr 15, 2022
@jncasey
Copy link
Collaborator Author

jncasey commented Apr 15, 2022

Great! This also closed #106, and makes PR #112 redundant

@hadware
Copy link
Collaborator

hadware commented Apr 16, 2022

Oh, btw. Since you seem to have a very good understanding of the whole lib, would you mind if I ask for your opinion on future PR's (from other github users)? I'm also making you "triager" for this repo.

@jncasey jncasey deleted the preserve_punctuation_fixes branch April 16, 2022 13:54
@jncasey
Copy link
Collaborator Author

jncasey commented Apr 16, 2022

Happy to help as much as I can!

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.

Maximum recursion depth exceeded with --preserve-punctuation and long documents
2 participants