Question 1 As we get the wiki articles we want to calculate sentiment of each one. One easy NLP library is TextBlob. TextBlob contains a basic polarity method rating article from -1 to 1. Here is a...

2 answer below »
Hi, this does have a written part as well as well as a code section all together. Please let me know if you need more time rather than send me incomplete or incorrectly answered questions like last time. I'm sure we can work with each other with anything you need.



Question 1 As we get the wiki articles we want to calculate sentiment of each one. One easy NLP library is TextBlob. TextBlob contains a basic polarity method rating article from -1 to 1. Here is a basic example of how to use it #pip install TextBlob from textblob import TextBlob tb=TextBlob(text) print(tb.sentiment.polarity) For the Assignment Calculate the Overall Polarity for at least 5 different pages on wikipedia. Try to find them in different genres (politics, history, science, celebrity, etc) Report on their totals.    Try to construct your own very positive sentences and your own very negative sentences (try 2-3 of each). Report how it does.  Question 2 Project Description Issue: Phishing attempts : Analysis of phishing emails vs non-phishing emails Do an analysis of the issue using textual analysis algorithms. You will need to collect some data for the issue so that you can do the analysis. Analysis techniques to choose from: · Word Distribution / Frequency / N-Grams · Part-of-Speech · Named Recognition · Sentiment Analysis · Text Classification · Topic Modeling · Sentence Structure Submission: Part A (10%): One page describing the issue you want to address and hypothesis of what you think the analysis might show Part B (90%):  All code and 3 – 4 page conference paper describing the results on the analysis
Answered 9 days AfterJul 15, 2021

Answer To: Question 1 As we get the wiki articles we want to calculate sentiment of each one. One easy NLP...

Rajashekar answered on Jul 25 2021
120 Votes
Name:        Date:
NLP ASSIGNMENT
1.TextBlob
Calculate the Overall Polarity for at least 5 different pages on Wikipedia. Try to find them in different genres (politics, history, science, celebrity, etc.)
Various different topics were
chosen to scrape data from the Wikipedia website namely:
1. History- History of Sociology
URL- https://en.wikipedia.org/wiki/History_of_sociology
2. Sports- 2020 Summer Olympics in Tokyo
URL- https://en.wikipedia.org/wiki/2020_Summer_Olympics
3. Politics-Pegasus Project
URL- https://en.wikipedia.org/wiki/Pegasus_Project_(investigation)
4. Science- Blue Origin
URL- https://en.wikipedia.org/wiki/Blue_Origin
5. Celebrity- Conservatorship dispute of Britney spears
URL- https://en.wikipedia.org/wiki/Conservatorship_dispute_of_Britney_Spears
Data was scrapped using Beautiful Soup module by parsing the html data and getting the text from paragraphs. Data cleaning was done to remove unnecessary characters and new line characters.For better understanding the default TexBlob analyzer is compared to a Naïve Bayes Analyzer. The Naïve Byes analyzer was trained on a dataset of movie reviews.
The polarity results for the various Wiki articles will be discussed below:
1. History- History of Sociology
URL- https://en.wikipedia.org/wiki/History_of_sociology
Polarity
Default: 0.11729825329103313
NBA: Sentiment (classification='pos', p_pos=1.0, p_neg=1.5086405325072088e-147)
2. Sports- 2020 Summer Olympics in Tokyo
URL- https://en.wikipedia.org/wiki/2020_Summer_Olympics
Polarity
Default: 0.07051515151515153
NBA: Sentiment (classification='pos', p_pos=1.0, p_neg=1.632070749558733e-64)
3. Politics-Pegasus Project
URL- https://en.wikipedia.org/wiki/Pegasus_Project_(investigation)
Polarity
Default: 0.011345598845598841
NBA: Sentiment (classification='pos', p_pos=1.0, p_neg=8.219045355333684e-47)
4. Science- Blue Origin
URL- https://en.wikipedia.org/wiki/Blue_Origin
Default: 0.10513604849811752
NBA: Sentiment (classification='pos', p_pos=1.0, p_neg=2.9304848542317243e-40)
5. Celebrity- Conservatorship dispute of Britney spears
URL- https://en.wikipedia.org/wiki/Conservatorship_dispute_of_Britney_Spears
Default: 0.07920939240771648
NBA: Sentiment (classification='pos', p_pos=1.0, p_neg=2.106589360624189e-54)
Analysis
The observation is...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here