nlp applications - computer science departmentgatius/mai-ihlp/applications2018.pdf · nlp...
TRANSCRIPT
![Page 1: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/1.jpg)
NLP Applications 1
NLP Applications
Two main areas:• Massive management of textual information sources:• For human use• For automatic collection of linguistic resources
• Person/Machine interaction
![Page 2: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/2.jpg)
NLP Applications 2
NLP Applications
Massive management of textual information sources
• Machine Translation (MT)• Information Retrieval (IR)• Question Answering (Q&A)• Information Extraction (IE)• Summarization
![Page 3: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/3.jpg)
NLP Applications 3
Machine Translation 1
• Process of translating a text from a source language to a target language preserving some properties• The main property to preserve (but not
the only one) is the meaning• MT textual vs oral• Different degrees of human
intervention
![Page 4: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/4.jpg)
NLP Applications 4
Machine Translation 2
![Page 5: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/5.jpg)
NLP Applications 5
Machine Translation 3
Interlingua
Semantic Str.
Syntactic Str.
Lexic Structure
Semantic Str.
Syntactic Str.
Lexic Structure
Source text Target text
Direct translation
Syntactic Transfer
Semantic Transfer
![Page 6: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/6.jpg)
NLP Applications 6
Statistical Machine Translation 4
Translation Model P(f|e)• Model for each word in the source language:• Its translation• the number of necessary words in the target language
• the position of the translation in the sentence
• the number of words that need to be generated from scratch.
![Page 7: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/7.jpg)
NLP Applications 7
Statistical Machine Translation 5
![Page 8: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/8.jpg)
NLP Applications 8
Information Retrieval 1
• Input• A collection of documents
• The Web• A corporate document collection• ...
• A user need represented as a query • Output
• The documents of the collection that satisfy the user needs.
![Page 9: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/9.jpg)
NLP Applications 9
Information Retrieval 2
Query
representation 2representation 1
Document
Queries space: Q Documents space: D
Representation space: R
q d
Human judgement: j
Comparison function: c
{0,1}
{0,1}
Oard, 1997
![Page 10: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/10.jpg)
NLP Applications 10
Information Retrieval 3
• Type of information• Text, speech, structured information
• Query language• Exact, ambiguous
• Matching• Exact, aproximate
• Kind of information needed• Loose, precise
• Relevance:• Usefulness of information according to user needs
IR types
![Page 11: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/11.jpg)
NLP Applications 11
Question Answering 1
• Natural extension of IR• A QA system receives a query expressed in
NL and tries to provide not a document containing the answer but the proper answer (usually a fact).
• QA systems need to use NLP techniques for both processing the question and looking for the answer.
![Page 12: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/12.jpg)
NLP Applications 12
Question Answering 2
• Some QA systems that can be accessed through the Web:
• Webclopedia• http://www.isi.edu/natural-language/projects/webclopedia/
• AskJeeves• http://www.ask.com
• LCC• http://www.languagecomputer.com/
![Page 13: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/13.jpg)
NLP Applications 13
Question Answering 3
• Factual QA
• Who? When? Where? • List QA
• Which are the last 10 presidents of USA?• Domain independent vs domain restricted QA• QA with complex queries:
• Which are the USA republican presidents after world war II?
• Linked queries
![Page 14: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/14.jpg)
NLP Applications 14
Question Answering 4
Frequently performed sequentially
IR of relevant documents
Segmentation in passages, IR of relevant passages
Question Processing Relevant termsQuestion typeFocus...
Relevant documents
Relevant passages
answerAnswer Extraction
![Page 15: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/15.jpg)
NLP Applications 15
Automatic Summarization 1
• A summary is a reductive transformation of a source text into a summary text by extraction or generation
![Page 16: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/16.jpg)
NLP Applications 16
Automatic Summarization 2
• Look for the relevant parts of a document and produce a summary of them
• Summarization vs Information Extraction - Information Extraction
• What has to be extracted is defined a priori
• “I am interested on this, look for it” - Summarization
• An a priori definition of what is relevant is not always defined
![Page 17: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/17.jpg)
NLP Applications 17
Automatic Summarization 3
multi-document
single-document
query
Summarizer
extract
abstract
headline
restrictions
Basic schema
![Page 18: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/18.jpg)
NLP Applications 18
Information Extraction 1
• Extracting useful information from free text• MUC, ACE, TAC challenges• Named Entity Recognition (NER)• Named Entity Classification (NEC)• Both tasks together (NERC)• Slot Filling• Relation Extraction
![Page 19: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/19.jpg)
NLP Applications 19
Information Extraction 2
NERC
![Page 20: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/20.jpg)
NLP Applications 20
Information Extraction 3
Slot Filling
• Set of relevant slots• ML
• Supervised Learning• Unsupervised Learning
• Distant learning• Semisupervised Learning
• Active Learning• Rule-based systems
![Page 21: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/21.jpg)
NLP Applications 21
Humam/machine communication
Main goal Help users perform specific tasks according
their objectives
Tasks of the dialogue systems - Interpreting user intervention
- Dialogue Management
- Generating system's intervention
![Page 22: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/22.jpg)
NLP Applications 22
Using the Natural Language Mode
• Advantatges • Human Language (natural,friendly)• Complex ideas can be expressed • References to other entities are easy to express
• Disadvantages • High cost• Ambiguity -- mistakes• Limitations for accessing several applications
(such as graphics)• Appropriate for occasional access to
applications that need to express complex operations (especially when domain can be restricted)
![Page 23: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/23.jpg)
NLP Applications 23
An Example of Conversational System
System: Welcome to the informaton service, what do you want?
User: I want to go from Barcelona to ValenciaSystem: When do you want to go?User: Next TuesdaySystem: At what time, morning or afternoon?User: Morning, pleaseSystem: There are 3 Euromed trains on
Tuesday morning
![Page 24: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/24.jpg)
NLP Applications 24
• Interpreting user’s intervention–Using dialog and domain knowledge
• Dialogue Management–Determine next system actions considering user's intention
• Answer Generation–Generate the system's sentences most appropriate at each state of the dialogue
Tasks of the Dialogue Systems
![Page 25: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/25.jpg)
NLP Applications 25
• Goal: understanding user's intention• Knowledge involved
• Phonetics and phonology
• Morphology
• Syntax
• Semantics (lexical and compositional)• Pragmatics• Discourse
Interpreting the user intervention
![Page 26: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/26.jpg)
NLP Applications 26
Interpreting the user intervention
• Goal: understanding the user's intention• Precise information from the user is required• The complexity of this process depends on the
system– Complete (deep) syntactic and semantic analysis– Partial (shallow) syntactic and semantic analysis– Processing key words
• This process is restricted by considering limited applications tasks
![Page 27: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/27.jpg)
NLP Applications 27
Intention Recognition (Real systems)
• The system infers the application task the user is asking for • Application: Giving information on cultural events
•Time or place where a specific event takes place
•Events that take place in a specific place
• Application: Giving information on trains•Schedule for a specific train
• The system asks the user the information the application needs• The system ignores the information not useful for
the application
![Page 28: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/28.jpg)
NLP Applications 28
Intention Recognition (Real systems)
S1: Which is your account number?U1: My account number in Online Bank?
S2: Would you want to transfer 1500 euros to your new account?U2: If I have this amount, ok
• System initiative• User initiative very limited
• Not allowed in complex acts such as confirmation, clarification and indirect answers
![Page 29: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/29.jpg)
NLP Applications 29
Representation of a user intervention
Train ticket Date Type From To Hour Prize
What Quantity: 1
Reservation What Quantity ...
Type: EuromedFrom: BarcelonaTo: Valencia
![Page 30: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/30.jpg)
NLP Applications 30
Dialogue Management 1
• Controlling dialog to help the user to achieve his goals– At each step of the conversation
• Who can speak• What can be said
– Used information• Interpretation of the user intervention• Application (domain) knowledge
![Page 31: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/31.jpg)
NLP Applications 31
• Determine the next system's action(s) – Answer user's questions– Ask the user for more information– Confirm/Clarify user's interventions– Notify problems when accessing the application– Suggest alternatives
• Generation of the system's messages– The content– The presentation
Dialogue Management 2
![Page 32: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/32.jpg)
NLP Applications 32
• Determine the next system's action(s) – Answer user's questions– Ask the user for more information– Confirm/Clarify user's interventions– Notify problems when accessing the application– Suggest alternatives
• Generation of the system's messages– The content– The presentation
Dialogue Management 3
![Page 33: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/33.jpg)
NLP Applications 33
• Determine the next system's action(s) – Answer user's questions– Ask the user for more information– Confirm/Clarify user's interventions– Notify problems when accessing the application– Suggest alternatives
• Generation of the system's messages– The content– The presentation
Dialogue Management 4
![Page 34: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/34.jpg)
NLP Applications 34
Dialogue Management 5
• Research systems• Focused on the development of models
and algorithms for supporting several dialogue phenomena for complex tasks
• Real systems• Focused on the development of robust
strategies, to deal efficiently with most common dialogue phenomena for simple applications
![Page 35: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/35.jpg)
NLP Applications 35
Answer Generation• Generation of sentences to achieve the
goals the dialogue manager has selected
• Tasks• Content selection
• Presentation of content• Using rethorical elements
• Superficial realization• Semantic representation of the text• What to say, how to say
![Page 36: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/36.jpg)
NLP Applications 36
Content Selection
• Determine the content of the system sentences in order to achieve the goals
• Examples:• Madagascar is not shown in Sant Cugat
[Nucleus]•It is shown in Barcelona [Satellite]
• Would you like a suite? [Nucleus]•It is the same price than the doble room
[Satellite]• Magic Flaute is not shown this year at
Liceu [Nucleus]•But Figaro Wedding is [Satellite]
![Page 37: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/37.jpg)
NLP Applications 37
Superficial realization
• Goal: to determine how content selected is presented
• Examples:Madagascar is not shown in Sant Cugat
but it is shown in Barcelona city
• Tasks• Construction of phrases • Lexical selection
![Page 38: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/38.jpg)
NLP Applications 38
Chatbots 1
- “A service, powered by rules and sometimes artificial intelligence, that you interact with via a chat interface. The service could be any number of things, ranging from functional to fun, and it could live in any major chat product (Facebook Messenger, Slack, Telegram, Text Messages, etc.)”.
https://chatbotsmagazine.com/
![Page 39: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/39.jpg)
NLP Applications 39
Chatbots 2
- Alicebot. http://www.alicebot.org/
- Based on AIML: Artificial Intelligence Markup Language, based on XML.
- Facilitate the creation of virtual personal assistant apps (like Siri)
![Page 40: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/40.jpg)
NLP Applications 40
• Content planning • Semantic representation of the text• What to say, how to say
Form planning Presentation of content Using rethorical elements
Language Generation
![Page 41: NLP Applications - Computer Science Departmentgatius/mai-ihlp/Applications2018.pdf · NLP Applications 36 Content Selection •Determine the content of the system sentences in order](https://reader034.vdocuments.us/reader034/viewer/2022042318/5f07eb8b7e708231d41f6bcb/html5/thumbnails/41.jpg)
NLP Applications 41
• Aligned corpora (various levels)• Grammars• Gazetteers• Resources including
– Morphology bases– Selectional restrictions– Subcategorization patterns– Topic Signatures
Automatic collection of linguistic resources