コード例 #1
0
def test_run_with_empty_string():
    assert len(list(run(''))) == 0
コード例 #2
0
def test_run_with_no_adjectives():
    assert len(list(run('the event'))) == 0
コード例 #3
0
def test_run_with_hash_tag():
    assert len(list(run('the #great #fantastic event.'))) == 2
コード例 #4
0
def test_run_with_punctuation():
    assert len(list(run('the great, fantastic event.'))) == 2
コード例 #5
0
def test_run_with_two_adjectives():
    assert len(list(run('the great fantastic event'))) == 2
コード例 #6
0
def aggregate_adjectives(query) -> None:
    tweet_ids = query.load_results('tweet')
    for tweet_id in tweet_ids:
        t = Tweet(tweet_id)
        query.add_results('adjectives', adjectives.run(t.text))
コード例 #7
0
ファイル: twitter.py プロジェクト: markdessain/tweet-analyser
def aggregate_adjectives(query) -> None:
    tweet_ids = query.load_results('tweet')
    for tweet_id in tweet_ids:
        t = Tweet(tweet_id)
        query.add_results('adjectives', adjectives.run(t.text))