-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow indices and prevent-feeding to work together. #281
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #281 +/- ##
==========================================
+ Coverage 92.46% 92.48% +0.01%
==========================================
Files 16 16
Lines 2284 2290 +6
Branches 515 516 +1
==========================================
+ Hits 2112 2118 +6
Misses 98 98
Partials 74 74 ☔ View full report in Codecov by Sentry. |
Calling |
Looks reasonable to me! Tbh I might also be fine with just raising an exception if someone has indices and |
No, we can't make this incompatible, I'm about to use if to fix kwk case preservation! Performance: I did some tests yesterday, and I'm no longer worried: strangely enough, using a cache to make sure I process each rule's output only once made 0 difference on the performance! I guess it's trivial compared to the cost of applying all the rules in the first place. It's only done on the final output of the rules that were actually used, so it kinda makes sense, it's a trivial blip at the end of the pipeline. |
Turning this back into a non-draft PR: with the tests I did yesterday, I now think this is ready to merge as is. |
never mind, this breaks other stuff, it needs more work... |
I think the problem I noticed is just due to #283 and this PR is OK as is, but I'll wait until 283 is fixed before I finalize this PR. |
400aa8e
to
4222816
Compare
I need this PR to finish my kwk work now, so I've rebased it and improved the unit tests a bit. In my opinion this is ready to merge. |
There was a problem hiding this 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 @joanise thanks! I noticed that we had the functionality of strip_index_notation
in a few places, so I refactored it out everywhere I could find it and just add the commit to this PR, hope you don't mind!
I think that's an excellent idea, thanks! I just think it belongs in |
Draft solution for #280
there are probably other functions that could get refactored to g2p/utils.py but I will leave that for a future pr
Also run the doctest test cases.
920c990
to
8363cfa
Compare
This is not optimized yet, more a proof of concept. Consider this a draft PR, but I'd like feedback on it now anyway please.