Kubernetes with OpenShift World Tour: Get hands-on experience and build applications fast! Find a workshop!

Create a cognitive news search app

This code pattern is part of the Watson Discovery learning path.

Summary

The web is home to massive amounts of data, with more being created every day. Organizations can harness this constant stream of information to gain understanding, plan strategies, and find opportunities. Enriched news data can help your application make dynamic connections across current events faster. In this code pattern, you’ll start with the basics and build your own news mining web application using JavaScript, Node.js, and the Watson Discovery Service. To do this, you’ll:

  • Use code that is written in Node.js, with the server-side using the Express framework and the client using ReactJS
  • Use the pre-built Watson Discovery News collection
  • Access the Watson Discovery Service through the Discovery API

Optionally, you can choose to:

  • Use a Slack interface to query the data
  • Push news alerts out to an RSS reader
  • Host the app on IBM Cloud

Description

This code pattern shows you how to tap into massive data sets to mine insight. You’ll build a news mining web application with the Watson Discovery Service using the Watson Node.js SDK. The app demonstrates two use cases using Watson Discovery News:

  • Search: Query for the most relevant new articles about a specific topic or subject. Because the news collection is pre-enriched with natural language processing, you can query not just on keywords or categories but also on concepts, sentiment, and relations to get richer search responses.

  • Trending topics in the news: Identify popular topics over the past 24 hours. Topics can be general or specific to an industry or category.

Flow

create a cognitive news search app flow diagram

  1. The user interacts with the app UI to request relevant news content.
  2. The app sends user requests to Watson Discovery News.
  3. The Watson Discovery Service is continually crawling the web to update its Discovery News collection.
  4. The Watson Discovery Service responds to Slack search requests.
  5. The Watson Discovery Service seeds news articles to the RSS Reader.

Instructions

Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.

Conclusion

This code pattern gave you some basic working knowledge of the Watson Discovery Service and showed you how to use Discovery along with JavaScript and Node.js to build your own news mining web application. The code pattern is part of the Learning Path: Getting started with Watson Discovery series. To continue the series and learn about more Watson Discovery Service features, take a look at the next code pattern, Use your own data to build a fully featured web app.

Ankur Patel
Rich Hagarty