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

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

src/s/o/social_media_brand_disambiguator-HEAD/tweet_annotator.py   social_media_brand_disambiguator(Download)
def determine_class_and_insert_tweet(tweet, db_conn, annotations_table, keyword):
    cls = determine_class(tweet, keyword)
    if cls != sql_convenience.CLASS_UNKNOWN:
        sql_convenience.insert_tweet(tweet, cls, db_conn, annotations_table)
 

src/s/o/social_media_brand_disambiguator-HEAD/test_tweet_annotator.py   social_media_brand_disambiguator(Download)
    def test_add_1_annotated_row(self):
        cls = 0
        sql_convenience.insert_tweet(tweet1, cls, config.db_conn, self.annotations_table)
 
        # now check we have the expected 1 row

src/s/o/social_media_brand_disambiguator-HEAD/ner_apis/opencalais/test_opencalais_ner.py   social_media_brand_disambiguator(Download)
    def test_full_loop(self):
        """Check that annotate_all_messages processes all messages"""
        # add a tweet to the source_table
        sql_convenience.insert_tweet(TWEET1, TWEET1CLASS, config.db_conn, self.source_table)
 

src/s/o/social_media_brand_disambiguator-HEAD/ner_apis/test_ner_api_caller.py   social_media_brand_disambiguator(Download)
    def insert_tweet(self, tweet):
        # add a tweet to the source_table
        sql_convenience.insert_tweet(tweet, tweet1class, config.db_conn, self.source_table)
 
    def check_we_have_only_n_record(self, table, nbr_expected):