Skip to content
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

Fix s plural noun #168

Merged
merged 6 commits into from
Jan 19, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions inflect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2973,6 +2973,9 @@ def _plnoun( # noqa: C901

# OTHERWISE JUST ADD ...s

if word[-1] == "s":
return word

return f"{word}s"

@classmethod
Expand Down Expand Up @@ -3420,6 +3423,9 @@ def _sinoun( # noqa: C901
if words.lowered[-3:] == "xes":
return word[:-2]

if words.lowered[-2:] == "ss":
return False

# HANDLE ...f -> ...ves

if word in si_sb_ves_ve_case or words.last.lower() in si_sb_ves_ve:
Expand Down Expand Up @@ -3469,6 +3475,8 @@ def _sinoun( # noqa: C901

if word in si_sb_es_is:
return word[:-2] + "is"
elif word[:-2] + "es" in si_sb_es_is:
return False

# OTHERWISE JUST REMOVE ...s

Expand Down