コード例 #1
0
def pipeline(liwc, bbapi, db, filter, blackboard, should_trim_rt,
             indicator_resolution):
    tweets = get_tweets(bbapi, filter, blackboard=blackboard) * extract()

    if should_trim_rt:
        tweets *= trim_rt()

    if indicator_resolution == "category":
        tweets *= liwc_tweets(liwc, normalize=True, compute_values=False)
    elif indicator_resolution == "rule":
        tweets *= rule_liwc_tweets(liwc, normalize=True)
    else:
        return

    return tweets
コード例 #2
0
def pipeline(liwc, bbapi, db, filter):
    tweets = ( get_tweets(bbapi, filter)
             * extract()
             * liwc_tweets(liwc, normalize=False, compute_values=False))

    return tweets
コード例 #3
0
def pipeline(liwc, bbapi, db, filter):
    tweets = (get_tweets(bbapi, filter) * extract() * liwc_tweets(liwc))

    g = (tweets + once(None)) * accumulate(liwc)
    return g
コード例 #4
0
def pipeline(countrules, bbapi, db, filter):
    tweets = (get_tweets(bbapi, filter) * extract() *
              count_rules_docs(countrules))

    return tweets