NLP_session-2

Post on 07-Aug-2015

104 views 0 download

Tags:

Transcript of NLP_session-2

NLP Training – Session 2

Dr. Alexandra M. Liguori

Incubio – The Big Data Academy

Barcelona, March 25, 2015

Dr. Alexandra M. Liguori NLP Training – Session 2

Welcome back!!!

Dr. Alexandra M. Liguori NLP Training – Session 2

Outline

1 Recap:1 Natural Language Processing2 Typical NLP tasks → practical examples with GATE

2 Def. of semantics3 Frames approach

1 FrameNet2 GATE for semantic/content analysis

4 What next? Topics for the last session

Dr. Alexandra M. Liguori NLP Training – Session 2

Natural Language Processing

NLP: techniques that process written human language aslanguage.

Dr. Alexandra M. Liguori NLP Training – Session 2

Natural Language Processing

NLP: techniques that process written human language aslanguage.

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization RegEx

Sentence splitting RegEx

POS-tagging POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization

RegEx

Sentence splitting RegEx

POS-tagging POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization RegEx

Sentence splitting RegEx

POS-tagging POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization RegEx

Sentence splitting

RegEx

POS-tagging POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization RegEx

Sentence splitting RegEx

POS-tagging POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization RegEx

Sentence splitting RegEx

POS-tagging

POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Basic and simpler tasks

Tokenization RegEx

Sentence splitting RegEx

POS-tagging POS-tagging algorithms andtag sets

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Complex tasks

Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),

Stanford NLP tool, GATE, ...

Topic extractionNERSemantic analysis...

Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Complex tasks

Lemmatization or Stemming

Implementations of PorterStemmer (e.g. in Java),

Stanford NLP tool, GATE, ...

Topic extractionNERSemantic analysis...

Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Complex tasks

Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),

Stanford NLP tool, GATE, ...

Topic extractionNERSemantic analysis...

Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Complex tasks

Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),

Stanford NLP tool, GATE, ...

Topic extractionNERSemantic analysis...

Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...

Dr. Alexandra M. Liguori NLP Training – Session 2

Typical NLP tasks: Complex tasks

Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),

Stanford NLP tool, GATE, ...

Topic extractionNERSemantic analysis...

Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...

Dr. Alexandra M. Liguori NLP Training – Session 2

EX.: GATE

Concrete examples with GATE:1 Tokenizer2 Sentence-splitter3 POS-tagger4 Stemmer

GATEhttps://gate.ac.uk/

development at the University of Sheffield, UK.

Dr. Alexandra M. Liguori NLP Training – Session 2

EX.: GATE

Concrete examples with GATE:1 Tokenizer2 Sentence-splitter3 POS-tagger4 Stemmer

GATEhttps://gate.ac.uk/

development at the University of Sheffield, UK.

Dr. Alexandra M. Liguori NLP Training – Session 2

Semantics

’Then you should say what you mean,’the March Hare went on.’I do,’ Alice hastily replied;

’at least, I mean what I say –that’s the same thing, you know.’

’Not the same thing a bit!’ said the Hatter. ’You might just aswell say that

”I see what I eat” is the same thing as ”I eat what I see”! ’

Lewis Carroll,Alice in Wonderland

Dr. Alexandra M. Liguori NLP Training – Session 2

Frames and FrameNet

FrameA schematic representation of a situation involving various

participants, and other conceptual roles.E.g.:

Abby bought a car from Robin for $5,000.Robin sold a car to Abby for $5,000.

English FrameNet

https://framenet.icsi.berkeley.edu/fndrupal/development at the International Computer Science Institute in

Berkeley, California.

Dr. Alexandra M. Liguori NLP Training – Session 2

Frames and FrameNet

FrameA schematic representation of a situation involving various

participants, and other conceptual roles.E.g.:

Abby bought a car from Robin for $5,000.Robin sold a car to Abby for $5,000.

English FrameNet

https://framenet.icsi.berkeley.edu/fndrupal/development at the International Computer Science Institute in

Berkeley, California.

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Frame Relations

FrameNet additionally captures relationships between differentframes using relations. These include the following:

Inheritance: When one frame is a more specific version ofanother, more abstract parent frame. Anything that is trueabout the parent frame must also be true about the childframe, and a mapping is specified between the frameelements of the parent and the frame elements of the child.Perspectivized-in: A neutral frame (likeCommerce-transfer-goods) is connected to a frame with aspecific perspective of the same scenario (e.g. theCommerce-sell frame, which assumes the perspective ofthe seller or the Commerce-buy frame, which assumes theperspective of the buyer)Subframe: Some frames like the Criminal-process framerefer to complex scenarios that consist of several individualstates or events that can be described by separate frameslike Arrest, Trial, and so on.

Dr. Alexandra M. Liguori NLP Training – Session 2

Frame Relations

Precedes: The Precedes relation captures a temporalorder that holds between subframes of a complex scenario.Causative-of and Inchoative-of : There is a fairly systematicrelationship between stative descriptions (e.g. thePosition-on-a-scale frame, "She had a high salary") andcausative descriptions (Cause-change-of-scalar-position,"She raised his salary") or inchoative descriptions(Change-position-on-a-scale, e.g. "Her salary increased").Using: A relationship that holds between a frame that insome way involves another frame. For instance, theJudgment-communication frame uses both the Judgmentframe and the Statement frame, but does not inherit fromeither of them because there is no clear correspondence ofthe frame elements.See-also: Connects frames that bear some resemblancebut need to be distinguished carefully.

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

English FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet

FrameA schematic representation of a situation involving various

participants, and other conceptual roles. E.g.:El rock influye en los artistas de hoy en díapara sus producciones artísticas.Los artistas de hoy en día se inspiran al rockpara sus producciones artísticas.

Spanish FrameNethttp://sfn.uab.es:8080/SFN

development at the Universidad Autónoma de Barcelona andInternational Computer Science Institute in Berkeley, California.

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet

FrameA schematic representation of a situation involving various

participants, and other conceptual roles. E.g.:El rock influye en los artistas de hoy en díapara sus producciones artísticas.Los artistas de hoy en día se inspiran al rockpara sus producciones artísticas.

Spanish FrameNethttp://sfn.uab.es:8080/SFN

development at the Universidad Autónoma de Barcelona andInternational Computer Science Institute in Berkeley, California.

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Spanish FrameNet Example

Dr. Alexandra M. Liguori NLP Training – Session 2

Frames and GATE

And now...Ex. in English implementing FRAMES, LUs, and FEs with

GATE !!!

GATEhttps://gate.ac.uk/

development at the University of Sheffield, UK.

Dr. Alexandra M. Liguori NLP Training – Session 2

Frames and GATE

And now...Ex. in English implementing FRAMES, LUs, and FEs with

GATE !!!

GATEhttps://gate.ac.uk/

development at the University of Sheffield, UK.

Dr. Alexandra M. Liguori NLP Training – Session 2

What next?

Topics for the last session:1 Question answering2 Reference resolution3 Named Entity Recognition (NER)4 Keyword / topic / information extraction

Dr. Alexandra M. Liguori NLP Training – Session 2