Skip to content

Conversation

@hippietrail
Copy link
Collaborator

Issues

Implements the first part of #233

Description

Fixes disagreement of grammatical number between pronoun and verb:

  • I walks → I walk

  • He walk → He walks

  • In the course of implementing this I found many annotations missing from the dictionary.

  • I also added a bunch of missing irregular verbs.

  • I added a couple of methods to SequenceExpr but the main one would be the new constructor SequenceExpr::with() which is a short way to express SequenceExpr::default().then()

  • I propagated ::with() through all the other linters I could find appropriate for it.

Demo

image

How Has This Been Tested?

  • Unit tests covering the relevant examples in Not working on writewithharper #233
  • Unit tests to cover positive and negative cases of every personal pronoun.
  • Unit tests for known edge cases.

Checklist

  • I have performed a self-review of my own code
  • I have added tests to cover my changes

Copy link
Collaborator

@elijah-potter elijah-potter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like very good work. Unfortunately, I found a few false positives that I'd love to see turn into passing tests:

  • "On April 10th, I suggested she consider a smaller, more intimate gathering."
  • "I suggested she sell it and use the proceeds to help with her relocation expenses, or perhaps rent a similar camera while in Barcelona."
  • "I’ve offered her alternative options – suggesting she rent a similar cottage herself, or even offering to cover part of the cost – but she always deflects, insisting she deserves to use this cottage."
  • "He donned his heavy oilskins and descended the winding staircase, his boots echoing in the hollow tower."

@hippietrail
Copy link
Collaborator Author

hippietrail commented Dec 19, 2025

This looks like very good work. Unfortunately, I found a few false positives that I'd love to see turn into passing tests:

* "On April 10th, I suggested she consider a smaller, more intimate gathering."

* "I suggested she sell it and use the proceeds to help with her relocation expenses, or perhaps rent a similar camera while in Barcelona."

* "I’ve offered her alternative options – suggesting she rent a similar cottage herself, or even offering to cover part of the cost – but she always deflects, insisting she deserves to use _this_ cottage."

* "He donned his heavy oilskins and descended the winding staircase, his boots echoing in the hollow tower."

Excellent finds! Quite surprising that none of the texts I tested on used these very common constructions. I supposed it's more literary than what's in GitHub readmes.

The first three all involve a verb which makes the following "that" optional. Another one I could think of is "insisted". There are probably others that will reveal themselves.

The last one is an example of one of the words which is not an irregular verb but which has its forms spread over multiple dictionary.dict entries due to involving a consonant doubling as part of the ending changing. As we discussed related to DerivedFrom. The entry for the past form was lacking its annotation flags. There are probably still some others I've missed that will turn up.

@elijah-potter
Copy link
Collaborator

I've found a few more false-positives. I think there may something more primitive at play here that can't be addressed by adding exceptions.

  • "Surely, he cannot offer the same sum as the developers."
  • "Am I the asshole for insisting she return the dress?"
  • "It’s also important to recognize that your family's pride in you is a genuine reflection of your value."

@hippietrail
Copy link
Collaborator Author

hippietrail commented Jan 13, 2026

I've found a few more false-positives. I think there may something more primitive at play here that can't be addressed by adding exceptions.

Yeah exceptions are kind of a last resort. Looking at this now... each is for a different reason:

  1. Cannot was not marked as an auxiliary in the dictionary.
  2. The verbs that take the subjunctive didn't allow present participle form.
  3. Checking for a preposition before the pronoun will indicate that it's part of a clause and can take "is".

@elijah-potter
Copy link
Collaborator

I'm very sorry to keep pushing this back. We're getting very close, and I really want this rule to be excellent, particularly because it is so helpful. I was only able to find three more false-positives.

  • "She sought out Mrs. Hawthorne, the village’s oldest resident, a woman known for her vast knowledge of local history and her unsettlingly accurate intuition."
  • "I admire your dedication to consistently drafting players who are actively trying to lose you points."
  • "When I reiterated the conditions I'd previously set, she hung up on me."

I suspect these are simply small problems in the dictionary.

@hippietrail
Copy link
Collaborator Author

hippietrail commented Jan 14, 2026

I'm very sorry to keep pushing this back. We're getting very close, and I really want this rule to be excellent, particularly because it is so helpful. I was only able to find three more false-positives.

  • "She sought out Mrs. Hawthorne, the village’s oldest resident, a woman known for her vast knowledge of local history and her unsettlingly accurate intuition."
  • "I admire your dedication to consistently drafting players who are actively trying to lose you points."
  • "When I reiterated the conditions I'd previously set, she hung up on me."

I suspect these are simply small problems in the dictionary.

No apologies needed! This is the best way - using real-world data to find the edges you can't anticipate.

The middle one is easily the hairiest for us! "lose you points" where "to lose" is a ditransitive verb that takes two objects. The first object, "you", is a pronoun which doesn't change form for subject vs object (like "it" but unlike every other personal pronoun). "Points" is here a plural noun but in form is also a 3rd person singular present verb". The 2nd person pronoun + 3rd person verb "you points" is the kind of thing this kind of linter looks for.


Actually it wasn't too hard. We can be sure there will be persistent edge cases. So put it through the wringer. Look for false negatives as well as false positives - but that is more difficult.

This fixes 1. and 3. from the new PR review.
But this does not yet tackle the ditransitive verb issue for 2.
@hippietrail hippietrail force-pushed the pronoun-verb-agreement-233 branch from 22f9a71 to 68b60bf Compare January 14, 2026 07:10
@elijah-potter elijah-potter added this pull request to the merge queue Jan 15, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 15, 2026
@elijah-potter elijah-potter added this pull request to the merge queue Jan 16, 2026
Merged via the queue into Automattic:master with commit 18f65d7 Jan 16, 2026
11 checks passed
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