Skip to content

Commit

Permalink
unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
jlherzberg committed Dec 4, 2019
1 parent 7aaf977 commit d05806c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/tagnews/senteval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
from tagnews.senteval.police_words import police_words_list, bins


def process_google_result(text):
document = types.Document(content=text, type=enums.Document.Type.PLAIN_TEXT)
sentiment = client.analyze_entity_sentiment(document=document)

for entity in sentiment.entities:
clean_entity = "".join(filter(str.isalpha, entity)).lower()

if clean_entity in police_words_list:

for mention in entity.mentions:
return mention.sentiment.score
# def process_google_result(text):
# document = types.Document(content=text, type=enums.Document.Type.PLAIN_TEXT)
# sentiment = client.analyze_entity_sentiment(document=document)
#
# for entity in sentiment.entities:
# clean_entity = "".join(filter(str.isalpha, entity)).lower()
#
# if clean_entity in police_words_list:
#
# for mention in entity.mentions:
# return mention.sentiment.score


class SentimentGoogler:
Expand Down

0 comments on commit d05806c

Please sign in to comment.