ibm bluemix paris meetup #27 20171219 - introduction to nlp with recast.ai

39
Introduction to NLP Gil Katz [email protected] @gil_katz

Upload: ibm-france-lab

Post on 22-Jan-2018

71 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Introduction to NLP

Gil Katz [email protected] @gil_katz

Page 2: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Introduction to NLP

Gil Katz [email protected] @gil_katz

Page 3: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Collaborative end-to-end bot platform

BUILD CONNECT MONITOR TRAIN

Page 4: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

1950: Turing Test (“Computing Machinery and Intelligence” / Alan Turing)

Historic Background

50’s-60’s: Machine translation to be reality in three to five years (Georgetown experiment)

60’s-80’s: NLP systems based on hard rules, some quite impressive!

Page 5: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

80’s-90’s: Machine learning for NLP, starting with simple algorithms (decision trees)

Historic Background

90’s-2000’s: Increasingly statistical models are used (starting with HMM for POS tagging)

2000’s-today: Neural Networks added to the mix

Page 6: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

NLU over translation Written over spoken Chatbots and Recast.AI

This Talk

Page 7: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

State of the Art Intents Entities Skills

Page 8: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Intents Subject of communication

Entities Important objects

Skills Take action

Page 9: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

greetings

I have no internet 4G doesn’t work No signal at my place

report-issue weather

Page 10: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

report-issue greetings

I have no internet 4G doesn’t work No signal at my place

weather

Page 11: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

report-issue greetings

I have no internet 4G doesn’t work No signal at my place

weather

Page 12: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

report-issue greetings

I have no internet 4G doesn’t work No signal at my place

weather

- Where are you located?

Page 13: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Powered by Machine Learning

Page 14: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Code

ML

data answers

rules

answers

data rules data answers

Page 15: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Supervised Unsupervised

Page 16: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Classification Regression

Page 17: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Preprocessing Be Prepared!

Page 18: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

J’ai envie d’une pizza aujourd’hui

J’ai envie d’une pizza aujourd’hui (fr)

J ’ ai envie d ’ une pizza aujourd’hui (fr) PRON

VERB

NOUN

ADP

DET

ADV

J ’ ai envie d ’ une pizza aujourd’hui (fr)

Page 19: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Intent Classification

Page 20: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Naive Bayes

Bayes’ Rule: P(i|w) = P(w|i)P(i)/P(w)

‘Sparse’ approach

L’enfant a mangé un poisson

Un poisson a mangé l’enfant

No context management

Page 21: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Neural Networks

Words are represented densely in an n-dimensional space

Representations are learned through context

Main problem: How to represent sentences?

vct(Berlin) - vct(Germany) + vct(France) = vct(Paris)

Page 22: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

SVM

RNNs (LSTM/GRU/QRNN/...)

Bi-LSTM with Attention

What’s more?

Siamese Networks

Page 23: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Named Entity Recognition

Page 24: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Named Entity Recognition Sequence Labeling

Page 25: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

I have no in yesterday since internet Nancy

Page 26: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

I have no in yesterday since internet Nancy

O O O CONNECTION O LOCATION O DATETIME

Page 27: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

? ? ? ? ? ? ? ?

I have no in yesterday since internet Nancy

Page 28: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

? ? ? ? ? ? ? ?

I have no in yesterday since internet Nancy

PERSON

LOCATION

Page 29: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

? ? ? ? ? ? ? ?

I have no in yesterday since internet Nancy

LOCATION

Page 30: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Hidden Markov Chains

Page 31: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

SSVM

CRF

RNN (LSTM/GRU/QRNN/...)

What’s more?

Page 32: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Entity Enrichment

Page 33: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

I have no internet in Nancy since yesterday

{

canonical: …

value: …

}

{

formatted: …

lat: …

lng: …

}

{

formatted: …

iso: …

accuracy: …

}

Page 34: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Dialog Management

Page 35: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Markov Decision Process Finite State Architecture Frame Based

Page 36: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

User Initiative Greetings

System Initiative Payment

Mixed Initiative QA/Track/Order

Page 37: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Wrap Up

Page 38: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

ML and NLP as engine behind chatbots

A chatbot is built on many ML tasks

Different algorithms fit different tasks

Recast.AI as an end-to-end chatbot development platform

Page 39: IBM Bluemix Paris Meetup #27   20171219 -  Introduction to NLP with Recast.ai

Questions?