Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)
Extract features from text for use in classification.

Attributes:
    min_n: Minimum sized n-gram to extract.
    max_n: Maximum sized n-gram to extract.
    tokenize: Function that tokenizes a document.

src/i/n/infertweet-0.2/infertweet/sentiment/train.py   infertweet(Download)
import multiprocessing
 
from infer.nlp import FeatureExtractor
 
import infertweet.corpus.semeval as semeval
              semeval.TestSemEval)
 
    extractor = FeatureExtractor(tokenizer=tokenizer)
    extractor.min_n, extractor.max_n = 1, 2
 

src/i/n/infer-0.1/infer/tests/nlp_test.py   infer(Download)
# Copyright (C) 2013 Wesley Baugh
from nose.tools import assert_raises
 
from infer.nlp import FeatureExtractor
from infer.classify import MultinomialNB
    def setup(self):
        self.extractor = FeatureExtractor()
        self.document = 'I am so happy about this project'
 
    def test_no_features(self):
            return document.lower().split(' ')
 
        self.extractor = FeatureExtractor(tokenizer=custom)
        assert self.extractor.tokenize is custom
 

src/i/n/infer-0.1/infer/tests/experiment_test.py   infer(Download)
    def setup(self):
        self.extractor = nlp.FeatureExtractor()
        self.extractor.min_n, self.extractor.max_n = 1, 1
        self.experiment = TestExperiment.MyApproach(extractor=self.extractor,
                                                    chunk_size=2, first_chunk=1)