



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Great job getting to this capstone project! In this project, you will be applying natural language processing (NLP) to sentiment analysis.
Developers who have the edge are those who find ways to apply their newfound skills from the get-go. As you may know, a developer portfolio , which is a collection of online creations that you have made, allows you to demonstrate your skills rather than just telling people about them. It’s a way of bringing your CV to life and introducing yourself to the world. As you learn more skills and put these into practice, each project that you complete will become more efficient and eye-catching.
These capstone projects give you the means to create projects for your very own developer portfolio, allowing you to walk away from this course not only with a certificate but, more importantly, with a head start to your tech career!
NLP applications can be classified into a number of categories based on what they do. Let’s have a brief look at some of these categories.
The volume of information being shared online is growing at an incredible rate, but due to language barriers, not everything is accessible to everyone. Language translation helps us conquer these language barriers by facilitating the translation of technical manuals, support content, or websites quickly and inexpensively. The challenge with language translation technologies is not in translating words, but in understanding the meaning of sentences to provide a true translation. If you’ve ever watched a movie in one language with subtitles in another language where you have been able to understand both languages, you will realise how prone to error the process of translation can be, even when using human experts. Sometimes the subtitles are outright wrong, and sometimes, although the words are translated accurately, the nuance of the meaning is lost or miscommunicated. Really effective NLP language translation is a challenging area in which exciting progress is being made.
In this task, you will develop a Python program that performs sentiment analysis on a dataset of product reviews.
A key focus of this project will be ensuring that your code is correct, well-formatted, readable, and that it adheres to the PEP 8 style guide. In this regard, make sure that you do the following (and double-check before submitting your work to avoid losing marks unnecessarily):
Datafiniti_Amazon_Consumer_Reviews_of_Amazon_Products_May19.csv
3.1. Implement a sentiment analysis model using spaCy: Load the en_core_web_md spaCy model to enable NLP tasks. This model will help you analyse and classify the sentiment of the product reviews.
3.2. Preprocess the text data: Remove stop words, and perform any necessary text cleaning to prepare the reviews for analysis.
3.2.1. To select the “reviews.text” column from the dataset and retrieve its data, you can simply use the square brackets notation. Here is the basic syntax:
reviews_data = dataframe['reviews.text']
This column represents the feature variable containing the product reviews we will use for the sentiment analysis.
3.2.2. To remove all missing values from this column, you can simply use the dropna() function from pandas using the following code:
clean_data = dataframe.dropna(subset=['reviews.text'])
3.3. Create a function for sentiment analysis: Define a function that takes a product review as input and predicts its sentiment.
3.4. Test your model on sample product reviews: Test the sentiment analysis function on a few sample product reviews to verify its accuracy in predicting sentiment.
4.1. A description of the dataset used. 4.2. Details of the preprocessing steps. 4.3. Evaluation of results. 4.4. Insights into the model's strengths and limitations.
Export it as a PDF file named sentiment_analysis_report.pdf.
Additional instructions:
● Some helpful guidelines on cleaning text:
○ To remove stop words, you can utilise the .is_stop attribute in spaCy. This attribute helps identify whether a word in a text qualifies as a stop word or not. Stop words are common words that do not add much meaning to a sentence, such as “the”, “is”, or “of”. Subsequently, you can employ the filtered list of tokens or words (words with no stop words) to conduct sentiment analysis.
○ The above code retrieves a review from the “reviews.text” column at index
Important: Be sure to upload all files required for the task submission inside your task folder and then click “Request review” on your dashboard.
Please take some time to complete this short feedback form to help us ensure we provide you with the best possible learning experience.
Expert.ai Team. (2020, June 9). Natural language processing applications. Expert.ai. https://expertsystem.com/natural-language-processing-applications/