Inflector icon indicating copy to clipboard operation
Inflector copied to clipboard

Fix some irregular pluralizations

Open AndrewRadev opened this issue 4 years ago • 4 comments

What it does:

Fixes the pluralization of "people" to "person" instead of "personople".

Why it does it:

Submatch 1 was the entire group starting with (\w* and wrapping the whole word. Moving the closing bracket to limit submatch 1 to just the \w*pe part seems to avoid the problem. There might be alternative fixes (get the second group rather than the first in some cases?), but I've tried to patch the problem with minimal changes to avoid causing unrelated bugs.

I've also added a few more tests, but I feel like pluralization in particular could use a lot more testing, just in case. It's one of those things that feel like they have a lot of edge cases that might break with changes to the rules.

AndrewRadev avatar Sep 23 '19 14:09 AndrewRadev

I just came across this issue myself with "person" becoming "personople"

Sadly, it doesn't look like any action is happening to incorporate this fix.

winstonewert avatar Jan 28 '20 19:01 winstonewert

The author hasn't been on GitHub for more than a year now. Sad that such useful crates kind of get lost. Do other people than @whatisinternet have push access (and publishing rights)?

mainrs avatar Sep 22 '20 14:09 mainrs

@mainrs I have a dependency on this crate, so I've forked it and am making updates there. I'll bring in this PR as well as a few others.

sezna avatar Aug 28 '21 15:08 sezna

@sezna can you share where your fork is?

droundy avatar Dec 16 '21 21:12 droundy