Beispiel #1
0
def test_normalize_list():
    # Strip away articles, unless there's only an article
    eq_(normalize_list('the dog'), ['dog'])
    eq_(normalize_list('the'), ['the'])

    # strip out pluralization
    eq_(normalize_list('big dogs'), ['big', 'dog'])
Beispiel #2
0
def test_normalize_list():
    # Strip away articles, unless there's only an article
    eq_(normalize_list('the dog'), ['dog'])
    eq_(normalize_list('the'), ['the'])

    # strip out pluralization
    eq_(normalize_list('big dogs'), ['big', 'dog'])
Beispiel #3
0
def normalize(text):
    """
    Get a string made from the non-stopword word stems in the text. See
    normalize_list().
    """
    return untokenize(normalize_list(text))
Beispiel #4
0
def normalize(text):
    """
    Get a string made from the non-stopword word stems in the text. See
    normalize_list().
    """
    return untokenize(normalize_list(text))