Natural Language Processing Applications: Fabienne Venant Université Nancy2 / Loria 2008/2009
Natural Language Processing Applications: Fabienne Venant Université Nancy2 / Loria 2008/2009
Applications
Fabienne Venant
aims at :
• making computers talk
• endowing computers with the linguistics
ability of humans
Dialog system
Fiction
Conversational agent – system dialog
• a chatterbot integrated
with 3D animated agent
character
• Improve customer
services
• Reduce customer reliance
on human operator
Dialog system
reality
• E-teaching : autotutor
(http://www.autotutor.org/what/what.htm )
– Intelligent tutoring system that helps student
learn by holding a conversationnal in natural
language
– Animated agent : synthesis speech,
intonation, facial expressions, and gestures
– demo (from 2002)
Machine translation
• Automatically translate
a document from one
language to another
• Very useful on the web
• Far from solved
problem
Question - answering
• Generalization of simple Web search
• Ask complete questions
– What does divergent mean?
– How many states were in Europe in 2007?
– What is the occupation of Bill Clinton’s wife ?
– What do scientist think about global warming?
Linguistic knowledge in NLP
Linguistic knowledge in NLP
What would HAL need to engage in this dialog?
– ...
Syntax
NP VP
John V NP PP
word2
“How are you doing?” I would ask.
“Ask me how I am feeling?” he answered.
“Okay, how are you feeling?” [. . .]
“I am very happy and very sad.”
“How can you be both at the same time?” I asked in all seriousness, a girl of
nine or ten.
“Because both require each others’ company. They live in the same house.
Didn’t you know?”
Terry Tempest Williams, “The village watchman” (1994)
• synonymy: sofa=couch=divan=davenport
• antonymy: good/bad, life/death, come/go
• contrast: sweet/sour/bitter/salty, solid/liquid/gas
• hyponymy, or class inclusion: cat<mammal<animal
• meronymy, or the part-whole relation: line<stanza<poem
Semantic relations
• Syntagmatic relations: relations between words that go
together in a syntactic structure.
– Collocation : heavy rain, to have breakfast, to deeply regret...
• Useful for generation
– Argumental structure
• Someone breaks something with something
3 arguments
• Morphological ambiguity :
Part of speech
– duck : verb / noun tagging
– her: dative pronoun / possessive pronoun
• Semantical ambiguity Word sense
– Make: create / cook disambiguation
• Syntatic ambiguity:
– Make: transitive/ ditransitive Syntactic
disambiguation /
– [her duck ] / [her][duck] parsing
Ambiguity
• Sound-to- text issues:
– Recognise speech.
– Wreck a nice peach.
• Speech act interpretation
– Can you switch on the computer?’
• Question or request?
Combinatorial problem
Ambiguity vs paraphrase
• Ambiguity : the same sentence can mean
different things
• Paraphrase: There are many ways of saying the
same thing.
– Beer, please.
– Can I have a beer?
– Give me a beer, please.
– I would like beer.
– I’d like a beer, please.
In generation (MeaningText), this implies making
choices
Combinatorial problem
Models and algorithms
Models and algorithms
• The various kind of knowledge can be
captured through the use of a small
number of formal models or theories
– Regular grammars
– Context-free grammars
– Feature augmented grammars
Models
State machines and formal rule systems are
the main tools used when dealing with
knowledge of phonology, morphology,and
syntax.
Models
• Models based on logics
– First Order Logic / predicate calculus
– Lamda-calculus, feature structures, semantic
primitives
These logical representations have traditionally
been used for modeling semantics and
pragmatics, although more recent work has
tended to focus on potentially more robust
techniques drawn from non-logical lexical
semantics.
Models
• Probabilistic models
– crucial for capturing every kind of linguistic knowledge.
– Each of the other models can be augmented with probabilities.
– Example, the state machine augmented with probabilities can
become
• weighted automaton, or Markov model.
• hidden Markov models (HMMs) : part-of-speech tagging, speech
recognition, dialogue understanding, text-to-speech, machine
translation....
• Key advantage of probabilistic models : ability to solve
the many kinds of ambiguity problems
– almost any speech and language processing problem can be
recast as “given N choices for some ambiguous input, choose
the most probable one”.
Models
• Vector space models
– based on linear algebra
– Information-retrieval
– Word meanings
Models
Language processing : search through a space of
states representing hypotheses about an input
– Speech recognition : search through a space of
phone sequences for the correct word.
– Parsing : search through a space of trees for the
syntactic parse of an input sentence.
– Machine translation : search through a space of
translation hypotheses for the correct translation of a
sentence into another language.
Models
• Machine learning models: classifiers, sequence models
– Based on attributes describing each object
– Classifier : attempts to assign a single object to a single class
– Sequence model: attempts to jointly classify a sequence of
objects into a sequence of classes.
• Symbolic paradigm
• Statistical paradigm
1950’s 1970’s
Symbolic paradigm 1
Formal language theory and generative syntax
• 1957 Noam Chomsky's Syntactic Structures
– A formal definition of grammars and languages
– Provides the basis for an automatic syntactic
processing of NL expressions
• Montague's PTQ
– Formal semantics for NL.
– Basis for logical treatment of NL meaning
• 1967 : Woods procedural semantics
– A procedural approach to the meaning of a sentence
– Provides the basis for a automatic semantic
processing of NL expressions
1950’s 1970’s
Symbolic paradigm 2
Parsing algorithms
– top-down and bottom-up
– dynamic programming.
– Transformations and Discourse Analysis
Project (TDAP)
• Harris, 1962
• Joshi and Hopely (1999) and Karttunen (1999),
• cascade of finite-state transducers.
1950’s 1970’s
Symbolic paradigm 3
AI
• Summer of 1956 :John McCarthy, Marvin Minsky,
Claude Shannon, and Nathaniel Rochester
– work on reasoning and logic
• Newell and Simon the Logic Theorist and the General
Problem Solver Early natural language understanding
systems
– Domains
– Combination of pattern matching and keyword search
– Simple heuristics for reasoning and question-answering
Statistical
• Supervised or non-supervised
• Rules acquired from large size corpora
• Not much linguistic expertise required
• Robust and quick
• Requires large size (annotated) corpora
• Error analysis is often difficult
Four paradigms: 1970-1983
• Statistical
• Logic-based paradigms
• Natural language understanding
• Discourse modeling
1970-1983
Statistical paradigm
Speech recognition algorithms
• Hidden Markov model (HMM) and the metaphors of the
noisy channel and decoding
– Jelinek, Bahl, Mercer, and colleagues at IBM’s Thomas J.
Watson Research Center,
– Baker at Carnegie Mellon University
• Baum and colleagues at the Institute for Defense
Analyses in Princeton
• AT&T’s Bell
Rabiner and Juang (1993) descriptions of the wide
range of this work.
1970-1983
Logic-based paradigm
• Q-systems and metamorphosis grammars
(Colmerauer, 1970, 1975)
• Definite Clause Grammars (Pereira and
Warren, 1980)
• Functional grammar (Kay,1979)
• Lexical Functional Grammar (LFG)
(Bresnan and Kaplan’s,1982)
importance of feature structure unification
1970-1983
Natural language understanding1
World Knowledge
User: I am a human.
Eliza: How long have you been a human?
When Eliza fails
• Yes/No Questions
User: Are you a good therapist?
Eliza: Would you prefer it if I were a good therapist?
User: I'm wondering about your skills as a therapist;
Eliza: Does it please you to believe I am wondering about my skills of
therapist?
• Wh-Questions
User: Who are you?
Eliza: Would you prefer it if I were not?
User: What do you want me to tell?
Eliza: Does that question interest you?
• Complex Assertions
User: I don't have a problem. I'm quite happy, I have a girlfriend, I
study. Everything is OK!
Eliza: Why do you not have any problem, I'm quite happy, you have a
girlfriend, you study. Everything is OK!
Eliza is not intelligent but...
• Regardless of what people believe or know about the inner workings of
computers, they talk about them and interact with them as social entities.
• Weizenbaum (1976) notes that many people continued to believe in
ELIZA’s abilities even after the program’s operation was explained to
them.
• People act toward computers as if they were people and expect that
computers should be able to understand their needs and be capable of
interacting with them naturally.
• Given these predispositions, speech- and language-based system are
not supposed to be intelligent
• But they may provide users with the most natural
interface for many applications
• So what about turing test?
NLP applications
Three main types of applications:
• Language input technologies
• Language processing technologies
• Language output technologies
Language input technologies
• Speech recognition
• Optical character recognition
• Handwriting recognition
• Retroconversion
Language input technologies
• Speech recognition
– Two main types of Applications
• Desktop control: dictation, voice control, navigation
• Telephony-based transaction: travel reservation,
remote banking, pizza ordering, voice control
– 60-90% accuracy.
– Speech recognition is not understanding!
– Based on statistical techniques and very large
corpora
Cf. the Parole team (Yves Laprie)
Language input technologies
• Speech recognition
– Desktop control
• Philips FreeSpeech (www.speech.philips.com)
• IBM ViaVoice (www.software.ibm.com/speech)
• Scansoft's DragonNaturallySpeaking
(www.lhsl.com/naturallyspeaking)
– demo
– See also google category:
http://directory.google.com/Top/Computers/Sp
eechTechnology/
Language input technologies
Dictation
• Dictation systems can do more than just transcribe what
was said:
– leave out the 'ums' and 'eh‘
– implement corrections that are dictated
– fill the information into forms
– rephrase sentences (add missing articles, verbs and
punctuation; remove redundant or repeated words and self
corrections)
Communicate what is meant, not what is said
• Speech can be used both to dictate content or to issue
commands to the word processing applications (speech
macros eg to insert frequently used blocks of text or to
navigate through form)
Language input technologies
Dictation and speech recognition
• Telephony-based elded products
– Nuance (www.nuance.com)
– ScanSoft (www.scansoft.com)
– Philips (www.speech.philips.com)
– Telstra directory enquiry (tel. 12455)
• See also google category :
– http://directory.google.com/Top/Computers/Sp
eechTechnology/Telephony/
Language input technologies
• Text-to-Speech