Giter VIP home page Giter VIP logo

aind-nlp-bookworm's Introduction

Project: Bookworm

A simple question-answering system built using IBM Watson's NLP services.

Overview

In this project, you will use IBM Watson's NLP Services to create a simple question-answering system. You will first use the Discovery service to pre-process a document collection and extract relevant information. Then you will use the Conversation service to build a natural language interface that can respond to questions.

Getting Started

Clone this repository to your local computer.

If you have the AIND Anaconda environment prepared, now is a good time to activate it.

Open the notebook bookworm.ipynb from a terminal using the following command:

jupyter notebook bookworm.ipynb

Then follow the instructions in the notebook.

Note: You may have to install some packages (mentioned in the notebook). To do so, simply open another terminal and use pip.

Tasks

Complete each task in the notebook by implementing or modifying code wherever there is a TODO comment in a code cell, and answering any inline questions by modifying markdown cells. E.g.:

Q: What is the overall sentiment detected in this text? Mention the type (positive/negative) and score.

A: Negative, -0.798

Once you have completed all tasks, save the notebook, and then export it into a PDF or HTML. Remember to submit both the notebook (.ipynb) and the PDF/HTML, along with any other files that may be needed, e.g. data files, in case you use your own (sample files provided with the project don't need to be submitted).

Note: Please do not submit your service-credentials.json file - that is meant to be kept secret.

Extensions

Feel free to work on the project with your own dataset. You can also turn it into a web-based application and deploy it on Bluemix.

IBM Watson Resources

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. Please refer to Udacity Terms of Service for further information.

aind-nlp-bookworm's People

Contributors

cgearhart avatar napratin avatar ronny-udacity avatar sudkul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aind-nlp-bookworm's Issues

Watson Error 415 when creating a collection

# Prepare a collection of documents to use
col, col_id = helper.fetch_object(discovery, "collection", "Story Chunks", environment_id=env_id,
    create=True, create_args=dict(
        environment_id=env_id, configuration_id=cfg_id,
        description="Stories and plots split up into chunks suitable for answering"
    ))

WatsonException: Error: The request failed. Please try again., Code: 415

It worked the previous week. New services with new credentials don't solve the issue.

helper.py needs small update to work with watson_developer_cloud version 1.0

Change the environments line in the following to "environment": "list_environments" in the following snippet. Alternatively, give some guidance on which version of the watson_developer_cloud to install. Reference the repo for the change.

# Methods for each object type
    list_methods = {
        "environment": "list_environments",
        "configuration": "list_configurations",
        "collection": "list_collections",
        "workspace": "list_workspaces"
    }

See this forum post for more info.

DecrepationWarning from watson_developer_cloud.DiscoveryV1()

discovery = watson_developer_cloud.DiscoveryV1(
                        version='2018-08-01',
                        url=discovery_creds['url'],
                        iam_apikey=discovery_creds['apikey'])

Throws the following warning:

DeprecationWarning: watson-developer-cloud moved to ibm-watson. To get updates, use the new package.

To follow the instructions and update the notebook ibm-watson and ibm-cloud-sdk-core can be installed with pip and imported as follows:

import ibm_watson
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

By using IAMAuthenticator discovery can be instantiated:

authenticator = IAMAuthenticator(apikey=discovery_creds['apikey'],
                                                       url=discovery_creds['url'])
discovery = ibm_watson.DiscoveryV1(version='2018-08-01',
                                                              authenticator=authenticator)

However, both listing and creating environments now throws an error:

environments = discovery.list_environments().get_result()
ApiException: Error: Not Found, Code: 404

and

# Prepare an environment to work in
env, env_id = helper.fetch_object(
    discovery, "environment", "Bookworm",
    create=True, create_args=dict(
        description="A space to read and understand stories"  # feel free to edit
    ))

ApiException: Error: Not Found, Code: 404

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.