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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  5. blitzlicht in Action

    View full-size slide

  6. blitzlicht in Action

    View full-size slide

  7. blitzlicht in Action

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size 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 full-size slide

  15. 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 full-size slide

  16. Code example

    View full-size slide

  17. 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 full-size slide

  18. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide