-
Notifications
You must be signed in to change notification settings - Fork 177
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
Simple regex checker for passive voice constructions #802
base: main
Are you sure you want to change the base?
Conversation
It seems that for the most part this PR is, well, broken. Its contents appear to be lost in over 372 changed files. Using regexes to hack together a passive voice check also doesn't seem ideal. With that being said, I think we'll have to close this, unless you're available to work on it @RyanMcCarl. |
@Nytelife26 Even if Ryan can’t work on this, it’s worth salvaging what we can from the PR. There are new modules buried in here based on Ryan’s professional expertise (he’s a lawyer and scholar who has taught advanced legal writing courses and does research on use of A.I. in law). |
In particular, see proselint/checks/mccarl/rm_style_pref_forms.py |
Ah, I see. I may have to root through the diffs and cherry-pick useful files, then - I didn't have time to review them all due to the mostly broken structure and the number of file changes. I'll take a look now, though. |
18fc718
to
3344df8
Compare
Codecov Report
@@ Coverage Diff @@
## main #802 +/- ##
==========================================
+ Coverage 94.72% 94.75% +0.03%
==========================================
Files 83 84 +1
Lines 1213 1221 +8
==========================================
+ Hits 1149 1157 +8
Misses 64 64
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I will review the Garner checks now as it is likely they are already present in another check since we have most of GMEU implemented. The McCarl checks and passive voice check will additionally need to be split up into two separate PRs before this can continue. |
71139a1
to
820870b
Compare
The regex needs to be adjusted to pass the special cases checks. Perhaps the exceptions functionality might make that easier. |
This is my first attempt to contribute, so please let me know if I need to do anything differently -- e.g. register the check with the application.
I haven't tested the regex extensively, but it performed well on this list.
Here are the results on Pythex:
Passive voice regex test 2018-06-12.pdf
Here is the regex itself -- I'm sure it can be improved, modularized into several regexes, etc. Happy to continue working on it when I can if you like the idea.