Natural Language Processing (NLP)

Slides:



Advertisements
Similar presentations
Computational language: week 10 Lexical Knowledge Representation concluded Syntax-based computational language Sentence structure: syntax Context free.
Advertisements

Statistical NLP: Lecture 3
Grammars.
For Monday Read Chapter 23, sections 3-4 Homework –Chapter 23, exercises 1, 6, 14, 19 –Do them in order. Do NOT read ahead.
Natural Language and Speech Processing Creation of computational models of the understanding and the generation of natural language. Different fields coming.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Introduction to Computational Linguistics Lecture 2.
1 Chapter 20 Understanding Language. 2 Chapter 20 Contents (1) l Natural Language Processing l Morphologic Analysis l BNF l Rewrite Rules l Regular Languages.
Natural Language Processing AI - Weeks 19 & 20 Natural Language Processing Lee McCluskey, room 2/07
Introduction to CL Session 1: 7/08/2011. What is computational linguistics? Processing natural language text by computers  for practical applications.
COMP 4060 Natural Language Processing Speech Processing.
1/16 LELA Language and Computers Harold Somers Professor of Language Engineering.
Artificial Intelligence 2004 Natural Language Processing - Syntax and Parsing - Language Syntax Parsing.
March 1, 2009 Dr. Muhammed Al-Mulhem 1 ICS 482 Natural Language Processing INTRODUCTION Muhammed Al-Mulhem March 1, 2009.
Statistical Natural Language Processing. What is NLP?  Natural Language Processing (NLP), or Computational Linguistics, is concerned with theoretical.
Natural Language Processing DR. SADAF RAUF. Topic Morphology: Indian Language and European Language Maryam Zahid.
Natural Language Understanding
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2005 Lecture 1 21 July 2005.
9/8/20151 Natural Language Processing Lecture Notes 1.
Artificial Intelligence 2004 Speech & Natural Language Processing Natural Language Processing written text as input sentences (well-formed) Speech.
CCSB354 ARTIFICIAL INTELLIGENCE (AI)
Lecture 12: 22/6/1435 Natural language processing Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
1 CS 385 Fall 2006 Chapter 14 Understanding Natural Language (omit 14.4)
Computational Linguistics Yoad Winter *General overview *Examples: Transducers; Stanford Parser; Google Translate; Word-Sense Disambiguation * Finite State.
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
1 Computational Linguistics Ling 200 Spring 2006.
Understanding Natural Language
Machine Translation  Machine translation is of one of the earliest uses of AI  Two approaches:  Traditional approach using grammars, rewrite rules,
Natural Language Processing Artificial Intelligence CMSC February 28, 2002.
Introduction to CL & NLP CMSC April 1, 2003.
Natural Language Sections What the Speaker Speaks §Intention l S wants H to believe P §Generation l S chooses the words, W to convey the.
Text Language Technology Natural Language Understanding Natural Language Generation Speech Recognition Speech Synthesis Text Meaning Speech.
Artificial Intelligence 2004 Speech & Natural Language Processing Natural Language Processing written text as input sentences (well-formed) Speech.
11 Chapter 14 Part 1 Statistical Parsing Based on slides by Ray Mooney.
Artificial Intelligence: Natural Language
October 2005CSA3180 NLP1 CSA3180 Natural Language Processing Introduction and Course Overview.
CSA2050 Introduction to Computational Linguistics Lecture 1 Overview.
Introduction to Dialogue Systems. User Input System Output ?
Computational linguistics A brief overview. Computational Linguistics might be considered as a synonym of automatic processing of natural language, since.
CSA2050 Introduction to Computational Linguistics Lecture 1 What is Computational Linguistics?
Artificial Intelligence 2004 Speech & Natural Language Processing Speech Recognition acoustic signal as input conversion into written words Natural.
Grammars Grammars can get quite complex, but are essential. Syntax: the form of the text that is valid Semantics: the meaning of the form – Sometimes semantics.
Artificial Intelligence: Natural Language
For Monday Read chapter 26 Last Homework –Chapter 23, exercise 7.
CSE467/567 Computational Linguistics Carl Alphonce Computer Science & Engineering University at Buffalo.
Natural Language Processing Chapter 1 : Introduction.
For Friday Finish chapter 23 Homework –Chapter 23, exercise 15.
Natural Language Processing Slides adapted from Pedro Domingos
1 An Introduction to Computational Linguistics Mohammad Bahrani.
Natural Language Processing (NLP)
For Monday Read chapter 26 Homework: –Chapter 23, exercises 8 and 9.
NATURAL LANGUAGE PROCESSING
Natural Language Processing (NLP)
By Kyle McCardle.  Issues with Natural Language  Basic Components  Syntax  The Earley Parser  Transition Network Parsers  Augmented Transition Networks.
Brief Intro to Machine Learning CS539
Speech Recognition
Natural Language Processing and Speech Enabled Applications
Statistical NLP: Lecture 3
Natural Language Processing
Advanced Higher Computing Based on Heriot-Watt University Scholar Materials Applications of AI – Vision and Languages 1.
Basic Intro Tutorial on Machine Learning and Data Mining
Natural Language - General
Natural Language Processing
Linguistic Essentials
A User study on Conversational Software
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
David Kauchak CS159 – Spring 2019
Artificial Intelligence 2004 Speech & Natural Language Processing
Natural Language Processing (NLP) Chapter One Introduction to Natural Language Processing(NLP)
Presentation transcript:

Natural Language Processing (NLP) Prof. Carolina Ruiz Computer Science WPI

NLP - Prof. Carolina Ruiz References The essence of Artificial Intelligence By A. Cawsey Prentice Hall Europe 1998 Artificial Intelligence: Theory and Practice By T. Dean, J. Allen, and Y. Aloimonos. The Benjamin/Cummings Publishing Company, 1995 Artificial Intelligence By P. Winston Addison Wesley, 1992 Artificial Intelligence: A Modern Approach By Russell and Norvig Prentice Hall, 2003 Recent Deep Learning + NLP developments, circa 2010-2020 NLP - Prof. Carolina Ruiz

NLP - Prof. Carolina Ruiz Communication Typical communication episode S (speaker) wants to convey P (proposition) to H (hearer) using W (words in a formal or natural language) 1. Speaker Intention: S wants H to believe P Generation: S chooses words W Synthesis: S utters words W 2. Hearer Perception: H perceives words W” (ideally W” = W) Analysis: H infers possible meanings P1,P2,…,Pn for W” Disambiguation: H infers that S intended to convey Pi (ideally Pi=P) Incorporation: H decides to believe or disbelieve Pi NLP - Prof. Carolina Ruiz

Natural Language Processing (NLP) Natural Language Understanding Taking some spoken/typed sentence and working out what it means Natural Language Generation Taking some formal representation of what you want to say and working out a way to express it in a natural (human) language (e.g., English) NLP - Prof. Carolina Ruiz

Applications of Nat. Lang. Processing Machine Translation Database Access Information Retrieval Selecting from a set of documents the ones that are relevant to a query Text Categorization Sorting text into fixed topic categories Extracting data from text Converting unstructured text into structured data Spoken language control systems Spelling and grammar checkers NLP - Prof. Carolina Ruiz

Natural language understanding Raw speech signal Speech recognition Sequence of words spoken Syntactic analysis using knowledge of the grammar Structure of the sentence Semantic analysis using info. about meaning of words Partial representation of meaning of sentence Pragmatic analysis using info. about context Final representation of meaning of sentence NLP - Prof. Carolina Ruiz

Natural Language Understanding Input/Output data Processing stage Other data used Frequency spectrogram freq. of diff. speech recognition sounds Word sequence grammar of “He loves Mary” syntactic analysis language Sentence structure meanings of semantic analysis words He loves Mary Partial Meaning context of x loves(x,Mary) pragmatics utterance Sentence meaning loves(John,Mary) NLP - Prof. Carolina Ruiz

Speech Recognition (1 of 3) Input Analog Signal Freq. spectrogram (microphone records voice) (e.g., Fourier transform) Hz time NLP - Prof. Carolina Ruiz

Speech Recognition (2 of 3) Frequency spectrogram Basic sounds in the signal (40-50 phonemes) (e.g., “a” in “cat”) Template matching against a database of phonemes Using dynamic time warping (speech speed) Constructing words from phonemes (e.g., “th”+”i”+”ng”=thing) Unreliable/probabilistic phonemes (e.g., “th” 50%, “f” 30%, …) Non-unique pronunciations (e.g., tomato), statistics of transitions phonemes/words (hidden Markov models) Words NLP - Prof. Carolina Ruiz

Speech Recognition - Complications No simple mapping between sounds and words Variance in pronunciation due to gender, dialect, … Restriction to handle just one speaker Same sound corresponding to diff. words e.g., bear, bare Finding gaps between words “how to recognize speech” “how to wreck a nice beach” Noise NLP - Prof. Carolina Ruiz

NLP - Prof. Carolina Ruiz Syntactic Analysis Rules of syntax (grammar) specify the possible organization of words in sentences and allows us to determine sentence’s structure(s) “John saw Mary with a telescope” John saw (Mary with a telescope) John (saw Mary with a telescope) Parsing: given a sentence and a grammar Checks that the sentence is correct according with the grammar and if so returns a parse tree representing the structure of the sentence NLP - Prof. Carolina Ruiz

Syntactic Analysis - Grammar sentence -> noun_phrase, verb_phrase noun_phrase -> proper_noun noun_phrase -> determiner, noun verb_phrase -> verb, noun_phrase proper_noun -> [mary] noun -> [apple] verb -> [ate] determiner -> [the] NLP - Prof. Carolina Ruiz

Syntactic Analysis - Parsing sentence noun_phrase verb_phrase proper_noun verb noun_phrase determiner noun “Mary” “ate” “the” “apple” NLP - Prof. Carolina Ruiz

Syntactic Analysis – Complications (1) Number (singular vs. plural) and gender sentence-> noun_phrase(n),verb_phrase(n) proper_noun(s) -> [mary] noun(p) -> [apples] Adjective noun_phrase-> determiner,adjectives,noun adjectives-> adjective, adjectives adjective->[ferocious] Adverbs, … NLP - Prof. Carolina Ruiz

Syntactic Analysis – Complications (2) Handling ambiguity Syntactic ambiguity: “fruit flies like a banana” Having to parse syntactically incorrect sentences NLP - Prof. Carolina Ruiz

NLP - Prof. Carolina Ruiz Semantic Analysis Generates (partial) meaning/representation of the sentence from its syntactic structure(s) Compositional semantics: meaning of the sentence from the meaning of its parts: Sentence: A tall man likes Mary Representation: x man(x) & tall(x) & likes(x,Mary) Grammar + Semantics Sentence (Smeaning)-> noun_phrase(NPmeaning),verb_phrase(VPmeaning), combine(NPmeaning,VPmeaning,Smeaning) NLP - Prof. Carolina Ruiz

Semantic Analysis – Complications Handling ambiguity Semantic ambiguity: “I saw the Prudential building flying into Boston” NLP - Prof. Carolina Ruiz

NLP - Prof. Carolina Ruiz Pragmatics Uses context of utterance Where, by who, to whom, why, when it was said Intentions: inform, request, promise, criticize, … Handling Pronouns “Mary eats apples. She likes them.” She=“Mary”, them=“apples”. Handling ambiguity Pragmatic ambiguity: “you’re late”: What’s the speaker’s intention: informing or criticizing? NLP - Prof. Carolina Ruiz

Natural Language Generation Talking back!  What to say or text planning flight(AA,london,boston,$560,2pm), flight(BA,london,boston,$640,10am), How to say it “There are two flights from London to Boston. The first one is with American Airlines, leaves at 2 pm, and costs $560 …” Speech synthesis Simple: Human recordings of basic templates More complex: string together phonemes in phonetic spelling of each word Difficult due to stress, intonation, timing, liaisons between words NLP - Prof. Carolina Ruiz

New advancements in NLP Tremendous advances in the 2010’s have yielded synergistic connections between machine learning and NLP Work in Deep Learning in recent years has revolutionized NLP both in terms of: Natural language understanding Natural language generation Emergence of highly accomplished NLP academic prototypes & commercial products NLP - Prof. Carolina Ruiz