Пример #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() )) 
Пример #2
0
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() )) )
Пример #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()