Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/s/o/social_media_brand_disambiguator-HEAD/score_results.py   social_media_brand_disambiguator(Download)
 
    # for each tweet in comparison table, get tweet_id and cls
    classifications_and_tweets = sql_convenience.extract_classifications_and_tweets(args.gold_standard_table)
    for gold_class, tweet_id, tweet in classifications_and_tweets:
        cls, _, _ = sql_convenience.extract_classification_and_tweet(args.comparison_table, tweet_id)

src/s/o/social_media_brand_disambiguator-HEAD/export_inclass_outclass.py   social_media_brand_disambiguator(Download)
def writer(class_name, table, cls_to_accept):
    class_writer = unicodecsv.writer(open(class_name, 'w'), encoding='utf-8')
    class_writer.writerow(("tweet_id", "tweet_text"))
    for cls, tweet_id, tweet_text in sql_convenience.extract_classifications_and_tweets(args.table):
        if cls == cls_to_accept:

src/s/o/social_media_brand_disambiguator-HEAD/learn1_coefficients.py   social_media_brand_disambiguator(Download)
def label_learned_set(vectorizer, clfl, threshold, validation_table):
    for row in sql_convenience.extract_classifications_and_tweets(validation_table):
        cls, tweet_id, tweet_text = row
        spd = vectorizer.transform([tweet_text]).todense()
        predicted_cls = clfl.predict(spd)

src/s/o/social_media_brand_disambiguator-HEAD/learn1.py   social_media_brand_disambiguator(Download)
def label_learned_set(vectorizer, clfl, threshold, validation_table):
    for row in sql_convenience.extract_classifications_and_tweets(validation_table):
        cls, tweet_id, tweet_text = row
        spd = vectorizer.transform([tweet_text]).todense()
        predicted_cls = clfl.predict(spd)

src/s/o/social_media_brand_disambiguator-HEAD/export_classified_tweets.py   social_media_brand_disambiguator(Download)
    writer = unicodecsv.writer(writer_stream, encoding='utf-8')
 
    classifications_and_tweets = sql_convenience.extract_classifications_and_tweets(args.keyword)
    for cls, tweet_id, tweet in classifications_and_tweets:
        writer.writerow((cls, tweet))