def basic_extractor(document, train_set):
    word_features = _get_words_from_dataset(train_set)
    tokens = _get_document_tokens(document)
    features = dict(((u'contains({0})'.format(word), (word in tokens))
                                            for word in word_features))
    return features
A basic document feature extractor that returns a dict indicating
dataset/ETHPy150Open sloria/TextBlob/textblob/classifiers.py/basic_extractor