stop_words = dict(NNP=['first', 'second'], NN=['thing'], VBP=['do', 'done'],
    VB=[], NNS=['lets', 'things'])

def filter_stop_words(pos_list):
    return [[token, token_type] for token, token_type in pos_list if token.
        lower() not in stop_words[token_type]]
python nltk keyword extraction from sentence