from tools import preferred_forms_check, memoize


@memoize
def check_lie_detector_test(text):
    """Suggest the preferred forms."""
    err = "lilienfeld.terms_to_avoid.lie_detector"
    msg = "Polygraph machines measure arousal, not lying per se. Try {}."

    list = [

        ["polygraph test",      ["lie detector test"]],
        ["polygraph machine",   ["lie detector machine"]],
    ]

    return preferred_forms_check(text, list, err, msg)

from tools import preferred_forms_check, existence_check, memoize


@memoize
def check_lie_detector_test(text):
    """Suggest the preferred forms."""
    err = "lilienfeld.terms_to_avoid.lie_detector"
    msg = "Polygraph machines measure arousal, not lying per se. Try {}."

    list = [

        ["polygraph test",      ["lie detector test"]],
        ["polygraph machine",   ["lie detector machine"]],
    ]

    return preferred_forms_check(text, list, err, msg)


@memoize
def check_p_equals_zero(text):
    """Check for p = 0.000."""
    err = "lilienfeld.terms_to_avoid.p_equals_zero"
    msg = "Unless p really equals zero, you should use more decimal places."

    list = [
        "p = 0.00",
        "p = 0.000",
        "p = 0.0000",
    ]

    return existence_check(text, list, err, msg, join=True)

Check for p = 0.00
Check for p = 0.00

#149

- from tools import preferred_forms_check, memoize
+ from tools import preferred_forms_check, existence_check, memoize
  
  
  @memoize
  def check_lie_detector_test(text):
      """Suggest the preferred forms."""
      err = "lilienfeld.terms_to_avoid.lie_detector"
      msg = "Polygraph machines measure arousal, not lying per se. Try {}."
  
      list = [
  
          ["polygraph test",      ["lie detector test"]],
          ["polygraph machine",   ["lie detector machine"]],
      ]
  
      return preferred_forms_check(text, list, err, msg)
  
+ 
+ @memoize
+ def check_p_equals_zero(text):
+     """Check for p = 0.000."""
+     err = "lilienfeld.terms_to_avoid.p_equals_zero"
+     msg = "Unless p really equals zero, you should use more decimal places."
+ 
+     list = [
+         "p = 0.00",
+         "p = 0.000",
+         "p = 0.0000",
+     ]
+ 
+     return existence_check(text, list, err, msg, join=True)
+ 
Check for p = 0.00
## Code Before:
from tools import preferred_forms_check, memoize


@memoize
def check_lie_detector_test(text):
    """Suggest the preferred forms."""
    err = "lilienfeld.terms_to_avoid.lie_detector"
    msg = "Polygraph machines measure arousal, not lying per se. Try {}."

    list = [

        ["polygraph test",      ["lie detector test"]],
        ["polygraph machine",   ["lie detector machine"]],
    ]

    return preferred_forms_check(text, list, err, msg)

## Instruction:
Check for p = 0.00
## Code After:
from tools import preferred_forms_check, existence_check, memoize


@memoize
def check_lie_detector_test(text):
    """Suggest the preferred forms."""
    err = "lilienfeld.terms_to_avoid.lie_detector"
    msg = "Polygraph machines measure arousal, not lying per se. Try {}."

    list = [

        ["polygraph test",      ["lie detector test"]],
        ["polygraph machine",   ["lie detector machine"]],
    ]

    return preferred_forms_check(text, list, err, msg)


@memoize
def check_p_equals_zero(text):
    """Check for p = 0.000."""
    err = "lilienfeld.terms_to_avoid.p_equals_zero"
    msg = "Unless p really equals zero, you should use more decimal places."

    list = [
        "p = 0.00",
        "p = 0.000",
        "p = 0.0000",
    ]

    return existence_check(text, list, err, msg, join=True)
