Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Level up your Bot with Watson

Level up your Bot with Watson

The Watson Services by IBM combine 20+ services you can use to enhance your bot, from Natural Language Processing to Image Analytics and beyond.

Sebastian

June 24, 2016
Tweet

More Decks by Sebastian

Other Decks in Programming

Transcript

  1. Level up your bot with
    Watson
    Vienna Bots Meetup
    @Sgoettschkes
    https://stocksnap.io/photo/LTB7BB80VH

    View Slide

  2. View Slide

  3. View Slide

  4. Bot ingredients
    Application
    Platform “Bot”
    ● Facebook
    ● Telegram
    ● Slack
    ● ...
    ● NLP
    ● Machine
    Learning
    ● API
    ● Database

    View Slide

  5. Bot ingredients
    Application
    Platform “Bot”
    ● Facebook
    ● Telegram
    ● Slack
    ● ...
    ● NLP
    ● Machine
    Learning
    ● API
    ● Database

    View Slide

  6. blitzlicht
    Improve communication by asking simple questions.
    1. Ask one question
    2. Have people answer in their own words
    3. Get insights

    View Slide

  7. blitzlicht in Action

    View Slide

  8. blitzlicht in Action

    View Slide

  9. blitzlicht in Action

    View Slide

  10. NLP APIs
    ● wit.ai
    ● Watson
    ● TextRazor
    ● Aylien
    ● ….

    View Slide

  11. Watson

    View Slide

  12. Watson APIs

    View Slide

  13. AlchemyLanguage
    ● Emotion Analysis
    ● Sentiment Analysis
    ● Entity Extraction
    ● Authors Extraction

    View Slide

  14. Watson API example
    HTTP GET http://gateway-a.watsonplatform.
    net/calls/text/TextGetEmotion?
    apiKey=myApiKey&text=I%20love%20bots%20so%
    much&outputMode=json

    View Slide

  15. Watson API example
    HTTP GET http://gateway-a.watsonplatform.
    net/calls/text/TextGetEmotion?
    apiKey=myApiKey&text=I%20love%20bots%20so%
    much&outputMode=json

    View Slide

  16. Watson API example
    HTTP GET http://gateway-a.watsonplatform.
    net/calls/text/TextGetEmotion?
    apiKey=myApiKey&text=I%20love%20bots%20so%
    much&outputMode=json

    View Slide

  17. Watson API example
    HTTP GET http://gateway-a.watsonplatform.
    net/calls/text/TextGetEmotion?
    apiKey=myApiKey&text=I%20love%20bots%20so%
    much&outputMode=json

    View Slide

  18. Watson API example
    HTTP GET http://gateway-a.watsonplatform.
    net/calls/text/TextGetEmotion?
    apiKey=myApiKey&text=I%20love%20bots%20so%
    much&outputMode=json

    View Slide

  19. Watson API example
    {
    "status": "OK",
    "language": "english",
    "text": "I love bots so much"
    "docEmotions": {
    "anger": "0.147255",
    "disgust": "0.041646",
    "fear": "0.090144",
    "joy": "0.50019",
    "sadness": "0.259973"
    }
    }

    View Slide

  20. Code example

    View Slide

  21. Code example
    Future emotion(String text) {
    String uri = '/calls/text/TextGetEmotion';
    String parameters = 'apikey=${apiKey}&text=${text}&outputMode=json';
    return http.get(Watson.baseUrl + uri + '?' + parameters).then((data) {
    Map response = JSON.decode(data.body);
    if (response['status'] == 'ERROR') {
    throw new WatsonException(response['statusInfo']);
    }
    return response;
    });
    }

    View Slide

  22. Code example
    watson.emotion(answer.text).then((Map response) {
    response['docEmotions'].forEach((String key, String value) {
    if (double.parse(value) > 0.5) {
    // The text has a pretty clear overall emotions
    }
    });
    });

    View Slide

  23. Pitfalls
    ● Inconsistent APIs
    ● Various pricings
    ● A lot of deprecated/beta APIs

    View Slide

  24. Summary
    https://pixabay.com/en/milky-way-andromeda-stars-galaxy-923801/

    View Slide

  25. https://www.dropbox.com/s/6z5aiwa8l09g2pa/86H.jpg

    View Slide