0 / 0
Watson Natural Language Processing library usage samples

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 the Resource hub.

You can access the Resource hub by selecting Resource hub from the Cloud Pak for Data as a Service navigation menu.

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 or a transformer model.

Sample project

If you don't want to download the sample notebooks to your project individually, you can download the entire sample project Text Analysis with Watson Natural Language Processing from the Cloud Pak for Data as a Service Resource hub.

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 targets sentiment analysis. The data file that is used by this notebook is included in the project as a data asset.

You can run all of the sample notebooks with the NLP + DO Runtime 24.1 on Python 3.11 XS environment except for the Analyzing hotel reviews using Watson Natural Language Processing notebook. To run this notebook, you need to create an environment template that is large enough to load the CPU-optimized models for sentiment and targets sentiment analysis.

Parent topic: Watson Natural Language Processing library

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more