Building a chatbot: NLP pipeline and dependency parsing
facebook.com/AI.in.Iasi/ By: Andrei Şuiu meetup.com/IASI-AI/
Building a chatbot: NLP pipeline and dependency parsing By: Andrei - - PowerPoint PPT Presentation
Building a chatbot: NLP pipeline and dependency parsing By: Andrei uiu meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/ What Is a Chatbot? Chat ro bots are computer programs powered by rules and sometimes artificial intelligence, that mimic
facebook.com/AI.in.Iasi/ By: Andrei Şuiu meetup.com/IASI-AI/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Chat robots are computer programs powered by rules and sometimes artificial intelligence, that mimic conversation with people via a chat interface. Applications:
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
ELIZA Created from 1964 to 1966 @MIT AI Laboratory by Joseph Weizenbaum
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
DoNotPay - a chatbot that provides free legal advices using AI invented by British entrepreneur Joshua Browder. It can assist with writing letters and filling out forms.
https://donotpay-search-master.herokuapp.com
By June of 2016, DoNotPay had successfully contested 160,000 parking tickets - a 64% success rate - and earlier this year, Browder added capabilities to assist asylum seekers in the US, UK and Canada. Now, the bot is able to assist with over 1,000 different legal issues in all 50 states and across the UK.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Help new employees to learn & find:
internal policies
structure
processes
○ names ○ profile photos ○ can be direct messaged or mentioned ○ can post messages or initiate conversation ○ upload files, etc... meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
cross selling/up-selling, help make purchase decisions ○ Handle objections personally, get customer feedback ○ Offer discount codes ○ Deliver shipping notifications, out-of-stock notificatoins
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
We know that the period in Mr. Smith and Google Inc. do not mark sentence boundaries.
the end of a sentence.
Sentence Boundary Disambiguation: you can use PTBTokenizer from Stanford CoreNLP for Java, or Punkt Sentence Tokenizer from NLTK for Python.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Part-Of-Speech Tagger is a piece of software that reads text in some language and assigns parts of speech to each word (and other token), such as noun, verb, adjective, etc., although generally computational applications use more fine-grained POS tags like 'proper-noun-plural' or 'verb-past-gerund'. Usually taggers use PoS abbreviations like:
Usually PoS taggers performs tokenization and lemmatization in the same time.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
The goal of both stemming and lemmatization is to reduce inflectional forms and sometimes derivationally related forms of a word to a common base form. For instance:
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Stemming usually refers to a crude heuristic process that chops off the ends of words in the hope of achieving this goal correctly most of the time, and often includes the removal of derivational affixes. Lemmatization usually refers to doing things properly with the use of a vocabulary and morphological analysis of words, normally aiming to remove inflectional endings only and to return the base or dictionary form of a word, which is known as the lemma.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Another way to represent dependencies. Note the root relation. The quick brown fox jumps over the lazy dog.
_
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Another way to represent dependencies. Note the root relation. The quick brown fox jumps over the lazy dog.
determiner
determiner
adjectival modifier
adjectival modifier
nominal subject is the proto-agent of a clause
The case relation is used for any preposition in English.
An adjectival modifier of a nominal is any adjective that serves to modify the meaning of the nominal.
nominal modifier relation is used for nominal modifiers of nouns or clausal predicates
facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Hyponym - is a word or phrase whose semantic field is included within that of another word, its hyperonym or hypernym. In simpler terms, a hyponym shares a type-of relationship with its hypernym. Verb hypernymy is also called troponymy. Wordnet is a large lexical database of English, and because it has hypernym/hyponym relationships among the synsets, it can be used as a lexical ontology. Ontology is a formal naming and definition of the types, properties, and interrelationships of the entities that really or fundamentally exist for a particular domain of discourse.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
In WordNet, word meanings are represented by synonym sets called synsets - lists of synonymous word forms that are interchangeable in some context. Examples: (suspect, surmise), (suspect, distrust, mistrust), (suspect, believe_to_be_guilty) meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Each verb synset contains a list of generic sentence frames illustrating the types of simple sentences in which the verbs in the synset can be used. There are total of 35 frames. Some examples:
(Ex: vegetate)
(Ex: respire, sleep)
(Ex: rain, snow)
(Ex: continue/proceed/keep, avoid )
(Ex: manipulate, wave, insuflate)
(Ex: become/go/get)
(Ex: dedicate, delegate/depute)
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
nsubj - nominal subject is the proto-agent of a clause ccomp - clausal complement of a verb is a dependent clause with an internal subject which functions like an object of the verb. dobj - direct object is the entity that is acted upon by the subject.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
Synset Verb Frames Hypernym synset Sentence suspect, surmise Somebody ----s something Somebody ----s that CLAUSE guess, venture, pretend, hazard I suspect that he is the
suspect, distrust, mistrust Somebody ----s somebody Somebody ----s something disbelieve, discredit I suspect the truthfulness of his words. suspect, believe_to_be_guilty Somebody ----s somebody to INFINITIVE Somebody ----s that CLAUSE think, opine, suppose, imagine, reckon, guess I suspect Osama to be the terrorist.
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/
meetup.com/IASI-AI/ facebook.com/AI.in.Iasi/