Repository: jaraco/inflect (language: python)

Issue:
Plural of "cash"
When I use `plural_noun("cash")` the expected result is "cash" (the name might sometimes be countable, but most of the times is uncountable). However, at the moment the output is "cashes". Is it possible to solve this issue?


Discussion / hints:
Any updates?
p.defnoun("cash", "cash")
> p.defnoun("cash", "cash")

Shouldn't this be the default behaviour? Is it possible to set it at a library level?
Agreed. Would you consider sending a PR to fix the issue?

Fix patch:
diff --git a/CHANGES.rst b/CHANGES.rst
index bfe499c..54842ae 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,8 @@
+v5.1.0
+======
+
+* #113: Add support for uncountable nouns.
+
 v5.0.3
 ======
 
diff --git a/inflect.py b/inflect.py
index 1a92c99..6ba83eb 100644
--- a/inflect.py
+++ b/inflect.py
@@ -169,7 +169,9 @@ def make_pl_si_lists(lst, plending, siendingsize, dojoinstem=True):
     "child": "children",
     "chili": "chilis|chilies",
     "brother": "brothers|brethren",
+    "infinity": "infinities|infinity",
     "loaf": "loaves",
+    "lore": "lores|lore",
     "hoof": "hoofs|hooves",
     "beef": "beefs|beeves",
     "thief": "thiefs|thieves",
@@ -981,6 +983,10 @@ def make_pl_si_lists(lst, plending, siendingsize, dojoinstem=True):
 
 
 pl_sb_uninflected_endings = [
+    # UNCOUNTABLE NOUNS
+    "butter",
+    "cash",
+    "information",
     # SOME FISH AND HERD ANIMALS
     "fish",
     "deer",


Test patch:
diff --git a/tests/inflections.txt b/tests/inflections.txt
index 14db37d..b37377c 100644
--- a/tests/inflections.txt
+++ b/tests/inflections.txt
@@ -122,6 +122,7 @@
               Burmese  ->  Burmese
              bursitis  ->  bursitises|bursitides
                   bus  ->  buses
+               butter  ->  butter
                  buzz  ->  buzzes
                buzzes  ->  buzz                           # VERB FORM
                 by it  ->  by them                        # ACCUSATIVE
@@ -152,6 +153,7 @@
             Carlylese  ->  Carlylese
                carmen  ->  carmina
                  carp  ->  carp
+                 cash  ->  cash
             Cassinese  ->  Cassinese
                   cat  ->  cats
               catfish  ->  catfish
@@ -387,6 +389,8 @@
                 index  ->  indexes|indices
           Indochinese  ->  Indochinese
               inferno  ->  infernos
+             infinity  ->  infinities|infinity
+          information  ->  information
               innings  ->  innings
    TODO:singular_noun Inspector General  ->  Inspectors General
           interregnum  ->  interregnums|interregna
@@ -438,6 +442,7 @@
                  loaf  ->  loaves
                 locus  ->  loci
             Londonese  ->  Londonese
+                 lore  ->  lores|lore
            Lorrainese  ->  Lorrainese
              lothario  ->  lotharios
                 louse  ->  lice