Views
No views yet
1model = ....
2
3text = "I pity Facebook for their lack of commitment against global warming , I like google for its support of increased education"
4# In the previous example we notice that depending on the type of entity (Google or Facebook) and depending on the type of to#pics (education or climate change) we have two types of sentiments
5
6# Predict the sentiment towards Facebook (entity) on Climate change (topic)
7sentiment, probability = model.predict(text, topic="climate change", entity= "Facebook")
8# sentiment = "negative
9
10# Predict the sentiment towards Google (entity) on Education (topic)
11sentiment, probability = model.predict(text, topic="climate change", entity= "Facebook")
12# Sentiment = "positive"
13
14# Predict the sentiment towards Google (entity) on Climate Change (topic)
15sentiment, probability = model.predict(text, topic="climate change", entity= "Facebook")
16# Sentiment = "neutral" / "not_found"
17
18# Predict the sentiment towards Facebook (entity) on Education (topic)
19sentiment, probability = model.predict(text, topic="climate change", entity= "Facebook")
20# Sentiment = "neutral" / "not_found"
211author = {HasiMichael, Solofo, Bruce, Sitwala},
2keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
3title = {Sentiment Classification toward Entity and Topics},
4year = {2023/04},
5version = {0}