There's been a lot of hype in the news lately about cryptocurrency, so you want to take stock, so to speak, of the latest news headlines regarding Bitcoin and Ethereum to get a better feel for the current public sentiment around each coin.
Here you will apply natural language processing to understand the sentiment in the latest news articles featuring Bitcoin and Ethereum. Also apply fundamental NLP techniques to better understand the other factors involved with the coin prices such as common words and phrases and organizations and entities mentioned in the articles.
Complete the following tasks:
Use the newsapi to pull the latest news articles for Bitcoin and Ethereum and create a DataFrame of sentiment scores for each coin.
Use descriptive statistics to answer the following questions:
Which coin had the highest mean positive score?
Ethereum had a slightly higher mean positive score
Which coin had the highest negative score?
Bitcoin had the highest compound score
Which coin had the highest positive score?
Bitcoin had the highest Positive score
In this section, you will use NLTK and Python to tokenize text, find n-gram counts, and create word clouds for both coins.
Be sure to:
- Lowercase each word.
- Remove punctuation.
- Remove stop words.
Next, look at the ngrams and word frequency for each coin.
- Use NLTK to produce the ngrams for N = 2.
- List the top 10 words for each coin.
Finally, generate word clouds for each coin to summarize the news for each coin.
In this section, you will build a named entity recognition model for both coins and visualize the tags using SpaCy.