Skip to content

[Repo Assist] Fix JsonProvider pluralizer incorrectly singularizing '-ases' words (e.g. 'purchases' → 'purchasis')#1600

Closed
github-actions[bot] wants to merge 2 commits into
mainfrom
fix/pluralizer-ase-suffix-1508-c17a963eb8e454d4
Closed

[Repo Assist] Fix JsonProvider pluralizer incorrectly singularizing '-ases' words (e.g. 'purchases' → 'purchasis')#1600
github-actions[bot] wants to merge 2 commits into
mainfrom
fix/pluralizer-ase-suffix-1508-c17a963eb8e454d4

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Repo Assist here — I'm an automated AI assistant for this repository.

Closes #1508

Root Cause

The Pluralizer.toSingular function applies suffix rules in order and stops at the first match. The rule for Latin-origin -sis/-ses pairs (e.g. analysisanalyses) matched any word ending in ses — including plain English words like purchases, cases, phases, phrases.

For example:

  • "purchases" ends with "ses" → rule strips "ses", adds "sis""purchasis"

Fix

Add a more specific "ase" / "ases" suffix rule before the "sis" / "ses" rule in the ordered list. This means words like purchases are correctly handled first:

  • "purchases" → ends with "ases" → strips "ases", adds "ase""purchase"
  • "cases""case"
  • "phases""phase"
  • "phrases""phrase"

To prevent regression for the genuine Greek/Latin word oasis/oases (which would otherwise be caught by the new "ases" rule), "oasis" is added to the special-words list so it is resolved before any suffix rule is tried.

Test Status

  • Build passes (dotnet build FSharp.Data.sln -c Release)
  • Tests pass (dotnet test tests/FSharp.Data.Core.Tests/FSharp.Data.Core.Tests.fsproj -c Release) — 2838 passed, 1 failed (pre-existing network connectivity failure unrelated to this change)
  • New regression test added: Purchases singularizes correctly - regression test for issue 1508

Generated by Repo Assist

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • www.google.com

…. 'purchases' -> 'purchasis')

Add 'ase'/'ases' suffix rule before the 'sis'/'ses' rule so that words
like 'purchases', 'cases', 'phases', 'phrases' correctly singularize to
'purchase', 'case', 'phase', 'phrase' respectively.

Add 'oasis'/'oases' to the special words list to preserve the correct
singularization of 'oases' -> 'oasis', which would otherwise be affected
by the new 'ase'/'ases' rule.

Fixes #1508

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review February 21, 2026 13:52
@github-actions
Copy link
Copy Markdown
Contributor Author

🤖 Note from Repo Assist

After creating this PR I discovered that PR #1524 by @bisen2 already addresses the same issue with an identical fix ("ase", "ases" rule before "sis", "ses"), and was already approved by @dsyme in March 2025 pending a version bump.

I've nudged @bisen2 on PR #1524. If they add the version bump, maintainers should prefer merging #1524 over this PR. This PR can be closed if #1524 is updated and merged.

Apologies for the duplication — I should have checked for existing PRs more thoroughly before creating this one.

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@6c79ed2cf36b9cfa0f5b499d00a0afc4a5d8f0c0. View source at https://github.com/githubnext/agentics/tree/6c79ed2cf36b9cfa0f5b499d00a0afc4a5d8f0c0/workflows/repo-assist.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant