Links

Run sentiment analysis

Tags: #newsapi #news #sentimentanalysis #ai #opendata #dataframe
Author: Jeremy Ravenel​
Description: This notebook uses Newsapi to analyze the sentiment of news articles.

Input

Import libraries

from naas_drivers import newsapi, sentiment

Model

Connect to newsAPI and get the data

data = newsapi.connect().get(
"bitcoin", fields=["title", "image", "link", "description"]
)

Get sentiment analysis

sentiment = sentiment.get(data, column_name="title")

Output

Display results

data
sentiment
Last modified 1mo ago