def test_sentence_input(self, sentence):
        reject_pat = re.compile(r"(^')|('$)|\s'|'\s|[\"(\(\)\[\])]")
        # Decode unicode, mainly to normalize fancy quotation marks
        if sentence.__class__.__name__ == "str":
            decoded = sentence
        else:
            decoded = unidecode(sentence)
        # Sentence shouldn't contain problematic characters
        if re.search(reject_pat, decoded): return False
        return True
Run 2-arg custom-coded rules through their paces.
dataset/ETHPy150Open jsvine/markovify/markovify/text.py/Text.test_sentence_input--crossover with--dataset/ETHPy150Open erikrose/parsimonious/parsimonious/tests/test_grammar.py/GrammarTests.test_simple_custom_rules