

def test_tag_and_stem():
    the_big_dogs = [('the', 'DT', 'the'), ('big', 'JJ', 'big'), ('dog', 'NNS', 'dogs')]
    eq_(tag_and_stem('the big dogs'), the_big_dogs)
    the_big_hashtag = [('the', 'DT', 'the'), ('#', 'NN', '#'), ('big', 'JJ', 'big'), ('dog', 'NN', 'dog')]
    eq_(tag_and_stem('the #big dog'), the_big_hashtag)
    two_sentences = [('i', 'PRP', 'I'), ('can', 'MD', 'ca'), ('not', 'RB', "n't"), ('.', '.', '.'), ('avoid', 'NNP', 'Avoid'), ('fragment', 'NNS', 'fragments'), ('.', '.', '.')]
    eq_(tag_and_stem("I can't. Avoid fragments."), two_sentences)

dataset/ETHPy150Open commonsense/metanl/tests/test_nltk_morphy.py test_tag_and_stem/original