Watson Natural Language Processing library usage samples
The sample notebooks demonstrate how to use the different Watson Natural Language Processing blocks and how to train your own models.
Sample project and notebooks
To help you get started with the Watson Natural Language Processing library, you can download a sample project and notebooks from a Data Science sample GitHub repository at Notebooks and projects.
Note that you need to download the sample project and the notebooks for the runtime environment in which you want to run the notebooks.
Sample notebooks
-
Financial complaint analysis
This notebook shows you how to analyze financial customer complaints using Watson Natural Language Processing. It uses data from the Consumer Complaint Database published by the Consumer Financial Protection Bureau (CFPB). The notebook teaches you to use the Tone classification and Emotion classification models.
-
Car complaint analysis
This notebook demonstrates how to analyze car complaints using Watson Natural Language Processing. It uses publicly available complaint records from car owners stored by the National Highway and Transit Association (NHTSA) of the US Department of Transportation. This notebook shows you how use syntax analysis to extract the most frequently used nouns, which typically depict the problems that review authors talk about and combine these results with structured data using association rule mining.
-
Complaint classification with Watson Natural Language Processing
This notebook demonstrates how to train different text classifiers using Watson Natural Language Processing. The classifiers predict the product group from the text of a customer complaint. This could be used, for example to route a complaint to the appropriate staff member. The data that is used in this notebook is taken from the Consumer Complaint Database that is published by the Consumer Financial Protection Bureau (CFPB), a U.S. government agency and is publicly available. You will learn how to train a custom CNN model and a VotingEnsemble model and evaluate their quality.
-
Entity extraction on Financial Complaints with Watson Natural Language Processing
This notebook demonstrates how to extract named entities from financial customer complaints using Watson Natural Language Processing. It uses data from the Consumer Complaint Database published by the Consumer Financial Protection Bureau (CFPB). In the notebook you will learn how to do dictionary-based term extraction to train a custom extraction model based on given dictionaries and extract entities using the BERT model.
-
Deploy a pretrained Sentiment model
This notebook shows how to create an online deployment that identifies sentiment, based on Watson Natural Language Processing blocks.
Sample project
If you don't want to download the sample notebooks to your project individually, you can download the entire sample project: NLP-Example-Project-RT24-1.zip
The sample project contains the sample notebooks listed in the previous section, including:
-
Analyzing hotel reviews using Watson Natural Language Processing
This notebook shows you how to use syntax analysis to extract the most frequently used nouns from the hotel reviews, classify the sentiment of the reviews and use aspect-oriented sentiment analysis for the most frequently extracted aspects. The data file that is used by this notebook is included in the project as a data asset.
The sample project contains custom environment templates for the sample notebooks. If you want to create your own templates, ensure that they have at least 4 GB of memory. The Complaint classification with Watson Natural Language Processing notebook requires a custom template with at least 8 GB of memory.
Parent topic: Watson Natural Language Processing library