Example #1
0
def function1(line):
    dist = Distributer()
    tweet_text = naturalLanguage.setTweet(line)
    if dist.isAboutElection(tweet_text,query_list):
        dist.extractToElection(tweet_text)
    else:
        dist.extractToAll(tweet_text)
    return list(set(dist.passElection() )) 
def function1(line,queue,counter,tenth):
    dist = Distributer()
    tweet_text = naturalLanguage.setTweet(line)
    if dist.isAboutElection(tweet_text,query_list):
        dist.extractToElection(tweet_text)
    else:
        dist.extractToAll(tweet_text)
    progress(counter,tenth)
    queue.put(list(set(dist.passElection() )) )
Example #3
0
def function1(line):
    dist = Distributer()
    tweet_text = setTweet(line)
    if dist.isAboutElection(tweet_text, query_list):
        dist.extractToElection(tweet_text)
    else:
        dist.extractToAll(tweet_text)
    progress()
    # if dist.passElection() != []:
    #    print ",".join(dist.passElection())
    return dist.passElection()