Skip to content
Steve Martinelli edited this page Mar 29, 2018 · 6 revisions

Short Name

Develop a web app built on the Watson Discovery and Watson Knowledge Studio

Short Description

In this Code Pattern, we walk you through a working example of a web application that queries and manipulates data from the Watson Discovery Service. The data enrichments are enhanced by the creation of a data model using Watson Knowledge Studio. This web app contains multiple UI components that you can use as a starting point for developing your own Watson Discovery Service applications.

Offering Type

Cognitive

Introduction

The main benefit of using the Watson Discovery Service is its powerful analytics engine that provides cognitive enrichments and insights into your data. This app provides examples of how to showcase these enrichments through the use of filters, lists and graphs. The key enrichments that we will focus on are:

  • Entities - people, companies, organizations, cities, and more.
  • Categories - classification of the data into a hierarchy of categories up to 5 levels deep.
  • Concepts - identified general concepts that aren't necessarily referenced in the data.
  • Keywords - important topics typically used to index or search the data.
  • Entity Types - the classification of the discovered entities, such as person, location, or job title.
  • Sentiment - the overall positive or negative sentiment of each document.

With Watson Knowledge Studio (WKS), data modeling can be used to inform Watson Discovery of additional entities and relationships that go beyond its default entity extraction and enrichment process. Through the use of annotations, the user can indicate entities and entity relationships on a small subset of documents, which can then be applied to a much larger set of similar documents. This model can then be applied to a Watson Discovery service instance and encorporated into the Discovery enrichment process as documents are uploaded into the service.

Authors

By Rich Hagarty

Code

Demo

  • N/A

Video

  • COMING

Overview

In this developer journey, we will create a Node.js web app built on Watson Discovery and Watson Knowledge Studio. Through the use of various UI components, this app will demonstrate how to extract and visualize the enriched data provided by the powerful Watson Discovery analytics engine, enhanced by a custom built Watson Knowledge Studio data model created specifically for handling food review type data.

When the reader has completed this Code Pattern, they will understand how to:

  • Use Watson Knowledge Studio to create a data model.
  • Deploy a WKS model to Watson Discovery.
  • Load and enrich data in the Watson Discovery Service.
  • Query and manipulate data in the Watson Discovery Service.
  • Create UI components to represent enriched data created by the Watson Discovery Service.
  • Build a complete web app that utilizes popular JavaScript technologies to feature Watson Discovery Service data and enrichments.

Flow

  1. A sample set of review documents are loaded into WKS for annotation.
  2. A WKS model is created.
  3. The WKS model is applied to a Watson Discovery service instance.
  4. The food review json files are added to the Discovery collection.
  5. The user interacts with the backend server via the app UI. The frontend app UI uses React to render search results and can reuse all of the views that are used by the backend for server side rendering. The frontend is using semantic-ui-react components and is responsive.
  6. User input is processed and routed to the backend server, which is responsible for server side rendering of the views to be displayed on the browser. The backend server is written using express and uses express-react-views engine to render views written using React.
  7. The backend server sends user requests to the Watson Discovery Service. It acts as a proxy server, forwarding queries from the frontend to the Watson Discovery Service API while keeping sensitive API keys concealed from the user.

Included components

  • Watson Discovery: A cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights.
  • Watson Knowledge Studio: Teach Watson the language of your domain with custom models that identify entities and relationships unique to your industry, in unstructured text. Use the models in Watson Discovery, Watson Natural Language Understanding, and Watson Explorer.

Featured technologies

  • Cognitive: Watson is a cognitive technology that can think like a human.
  • Node.js: An asynchronous event driven JavaScript runtime, designed to build scalable applications.

Blog

  • COMING

Links