def test_remove_punctuation():
    assert remove_punctuation('yes & no!') == 'yes no'
Exemplo n.º 2
0
def load_unique_lines(source_path):
    source_text = open(source_path, 'rt').read().strip()
    return sorted(set(
        remove_punctuation(x).title() for x in source_text.splitlines()))
def test_remove_punctuation():
    assert remove_punctuation('yes & no!') == 'yes no'
Exemplo n.º 4
0
def load_terms(text):
    return sorted(set(
        remove_punctuation(x).title() for x in text.splitlines()))