from tools import memoize, preferred_forms_check


@memoize
def check(text):
    """Suggest the preferred forms."""
    err = "garner.mondegreens"
    msg = "'{}' is the preferred form."

    list = [
        ["a girl with colitis goes by",  "a girl with kaleidascope eyes"],
        ["a partridge in a pear tree",   "a part-red gingerbread tree"],
        ["attorney and not a republic",  "attorney and notary public"],
        ["beck and call",                "beckon call"],
        ["for all intents and purposes", "for all intensive purposes"],
        ["laid him on the green",        "Lady Mondegreen"],
        ["Olive, the other reindeer",    "all of the other reindeer"],
        ["to the manner born",           "to the manor born"],
    ]

    return preferred_forms_check(text, list, err, msg)

from tools import memoize, preferred_forms_check


@memoize
def check(text):
    """Suggest the preferred forms."""
    err = "garner.mondegreens"
    msg = "'{}' is the preferred form."

    list = [
        ["a girl with kaleidascope eyes", "a girl with colitis goes by"],
        ["a partridge in a pear tree",    "a part-red gingerbread tree"],
        ["attorney and not a republic",   "attorney and notary public"],
        ["beck and call",                 "beckon call"],
        ["for all intents and purposes",  "for all intensive purposes"],
        ["laid him on the green",         "Lady Mondegreen"],
        ["Olive, the other reindeer",     "all of the other reindeer"],
        ["to the manner born",            "to the manor born"],
    ]

    return preferred_forms_check(text, list, err, msg)

Fix bug in mondegreen rule
Fix bug in mondegreen rule

(The correct versions should all be in the left column.)

  from tools import memoize, preferred_forms_check
  
  
  @memoize
  def check(text):
      """Suggest the preferred forms."""
      err = "garner.mondegreens"
      msg = "'{}' is the preferred form."
  
      list = [
-         ["a girl with colitis goes by",  "a girl with kaleidascope eyes"],
+         ["a girl with kaleidascope eyes", "a girl with colitis goes by"],
-         ["a partridge in a pear tree",   "a part-red gingerbread tree"],
+         ["a partridge in a pear tree",    "a part-red gingerbread tree"],
-         ["attorney and not a republic",  "attorney and notary public"],
+         ["attorney and not a republic",   "attorney and notary public"],
-         ["beck and call",                "beckon call"],
+         ["beck and call",                 "beckon call"],
-         ["for all intents and purposes", "for all intensive purposes"],
+         ["for all intents and purposes",  "for all intensive purposes"],
-         ["laid him on the green",        "Lady Mondegreen"],
+         ["laid him on the green",         "Lady Mondegreen"],
-         ["Olive, the other reindeer",    "all of the other reindeer"],
+         ["Olive, the other reindeer",     "all of the other reindeer"],
-         ["to the manner born",           "to the manor born"],
+         ["to the manner born",            "to the manor born"],
      ]
  
      return preferred_forms_check(text, list, err, msg)
  
Fix bug in mondegreen rule
## Code Before:
from tools import memoize, preferred_forms_check


@memoize
def check(text):
    """Suggest the preferred forms."""
    err = "garner.mondegreens"
    msg = "'{}' is the preferred form."

    list = [
        ["a girl with colitis goes by",  "a girl with kaleidascope eyes"],
        ["a partridge in a pear tree",   "a part-red gingerbread tree"],
        ["attorney and not a republic",  "attorney and notary public"],
        ["beck and call",                "beckon call"],
        ["for all intents and purposes", "for all intensive purposes"],
        ["laid him on the green",        "Lady Mondegreen"],
        ["Olive, the other reindeer",    "all of the other reindeer"],
        ["to the manner born",           "to the manor born"],
    ]

    return preferred_forms_check(text, list, err, msg)

## Instruction:
Fix bug in mondegreen rule
## Code After:
from tools import memoize, preferred_forms_check


@memoize
def check(text):
    """Suggest the preferred forms."""
    err = "garner.mondegreens"
    msg = "'{}' is the preferred form."

    list = [
        ["a girl with kaleidascope eyes", "a girl with colitis goes by"],
        ["a partridge in a pear tree",    "a part-red gingerbread tree"],
        ["attorney and not a republic",   "attorney and notary public"],
        ["beck and call",                 "beckon call"],
        ["for all intents and purposes",  "for all intensive purposes"],
        ["laid him on the green",         "Lady Mondegreen"],
        ["Olive, the other reindeer",     "all of the other reindeer"],
        ["to the manner born",            "to the manor born"],
    ]

    return preferred_forms_check(text, list, err, msg)
