Repository navigation
Conversation
Identical possessive stems are not handled by the irregular plural-pair check. Recognize stems classified as plural by the existing singularizer, and check possessive equivalence before the generic noun and verb paths can misclassify the apostrophe suffix. Promote the existing dresses regression and preserve singular-only TODOs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the plural-possessive part of #58: the already checked-in expected failures for
compare("dresses's", "dresses'")andcompare_adjs(...)now pass as"p:p".After removing the possessive suffix, both inputs have the same stem.
_pl_check_plurals_Nonly handles different irregular plural forms, so it does not recognize this case. Accept identical stems when the existingsingular_nounclassifies the stem as plural. Incompare(), check this possessive equivalence before the generic noun/verb paths can treat the extrasas an ordinary inflection.The change deliberately does not add the undocumented
"s:s"result, alter possessive generation, or fix the singular-name TODOs (dress's/dress',Jess's/Jess'). Consequently this PR does not close all of #58. It follows the existing plural-vs-singular classification rather than introducing a new linguistic rule: ambiguous names such asJamesremain subject to the existing singularizer's classification.Verification
Linux x86_64, native isolated CPython 3.10.21 and 3.13.5:
dressesxfails promoted to ordinary assertions in both generic and adjective comparison tests; unrelateds:sxfails retained.git diff --checkpass.Timing / draft
Eight fresh subprocess samples per version, interleaved baseline/head then head/baseline, 1,000 public calls per case. Microseconds/call (min / median / max):
compare('cat','cats')compare_adjs('my','our')Ranges overlap; this does not establish performance neutrality. Draft for maintainer review of recognizing existing plural stems before generic noun/verb comparison. Ordinary nonpossessive generic comparisons bypass the new helper call. No broader possessive-generation redesign is included.
AI disclosure
Prepared with AI assistance. Investigation, implementation, tests, local checks and this description are AI-assisted; no human review is claimed. A separate assistant will independently inspect the production diff and rerun focused regressions. The small fix restores an existing checked-in expected result rather than inventing a new comparison category.