NLP_lectures_English
-
Upload
alexandra-m-liguori-phd -
Category
Documents
-
view
855 -
download
0
Transcript of NLP_lectures_English
Introduction to Natural Language Processingin 3 Sessions
Dr. Alexandra M. Liguori
Incubio – The Big Data Academy
Barcelona, March - April, 2015
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Outline: Lecture 1
1 Introduction2 Natural Language Processing3 Linguistic Ambiguities4 Definition of corpus5 Typical NLP tasks6 POS-tagging
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Outline: Lecture 2
1 Recap: Typical NLP tasks → practical examples with GATE2 Def. of semantics3 Frames approach
1 FrameNet2 GATE for semantic/content analysis
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Outline: Lecture 3
1 Recap: Typical NLP tasks2 Automatic Question Answering3 Reference resolution4 Named Entity Recognition (NER)5 Keyword / topic / information extraction
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Welcome!
Here we go...!!!
Main references:
Text book: Speech and Language Processing by D. Jurafskyand J. H. Martin
English FrameNet: https://framenet.icsi.berkeley.edu/fndrupal/
Spanish FrameNet: http://sfn.uab.es:8080/SFN
GATE: https://gate.ac.uk/
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Outline: Lecture 1
1 Introduction2 Natural Language Processing3 Linguistic Ambiguities4 Definition of corpus5 Typical NLP tasks6 POS-tagging
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
Video:https://www.youtube.com/watch?v=dSIKBliboIo
(Stanley Kubrick and Arthur C. Clarke,screenplay of 2001: A Space Odyssey )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
Dave Bowman: Open the pod bay doors, HAL.
HAL: I’m sorry Dave, I’m afraid I can’t do that.
(Stanley Kubrick and Arthur C. Clarke,screenplay of 2001: A Space Odyssey )
https://www.youtube.com/watch?v=dSIKBliboIo
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’t
vs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology
2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’t
vs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t
3 Syntax → cfr. Open the pod bay doors, HAL.vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’t
vs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’t
vs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words
5 Compositional semantics → knowledge of howcomponents combine to form larger meanings
6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’tvs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings
6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’tvs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’t
vs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Introduction: Intelligent machines?
1 Phonetics and phonology2 Morphology → produce contractions I’m and can’t3 Syntax → cfr. Open the pod bay doors, HAL.
vs. HAL, the pod bay door is open.vs. HAL, is the pod bay door open?
4 Lexical semantics → meaning of component words5 Compositional semantics → knowledge of how
components combine to form larger meanings6 Pragmatics → cfr. I’m sorry ... , I’m afraid I can’t
vs. No, I won’t open the door.vs. No.
7 Discourse conventions → engaging in structuredconversation using reference that in I’m sorry Dave, I’mafraid I can’t do that
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Natural Language Processing
NLP: techniques that process written human language aslanguage.
Applicationsword countingautomatic hyphenationautomated question answeringnamed entity extraction (NER)information/content extractionsemantic analysissentiment analysismachine translation
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Natural Language Processing
NLP: techniques that process written human language aslanguage.
Applicationsword countingautomatic hyphenationautomated question answeringnamed entity extraction (NER)information/content extractionsemantic analysissentiment analysismachine translation
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Natural Language Processing
NLP: techniques that process written human language aslanguage.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Natural Language Processing
NLP: techniques that process written human language aslanguage.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Natural Language Processing
An ideal NLP team is very interdisciplinary, including:Language experts (linguists)Maths experts (mathematicians, physicists, statisticians)Programmers (computer scientists)
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Maths & Computer Science
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
1 Phonetics and phonology ↔ red - read - read ;sleigh - slay
2 Morphology ↔ I/you/we/you/they walk - he/she/it walks;walked; walking
3 Syntax ↔ She ate a mammoth breakfast - She eating amammoth breakfast
4 Semantics ↔ book (verb) - book (noun);duck (verb) - duck (noun)
5 Pragmatics ↔ open the door - can you open the door? -could you open the door, please?
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
1 Phonetics and phonology ↔ red - read - read ;sleigh - slay
2 Morphology ↔ I/you/we/you/they walk - he/she/it walks;walked; walking
3 Syntax ↔ She ate a mammoth breakfast - She eating amammoth breakfast
4 Semantics ↔ book (verb) - book (noun);duck (verb) - duck (noun)
5 Pragmatics ↔ open the door - can you open the door? -could you open the door, please?
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
1 Phonetics and phonology ↔ red - read - read ;sleigh - slay
2 Morphology ↔ I/you/we/you/they walk - he/she/it walks;walked; walking
3 Syntax ↔ She ate a mammoth breakfast - She eating amammoth breakfast
4 Semantics ↔ book (verb) - book (noun);duck (verb) - duck (noun)
5 Pragmatics ↔ open the door - can you open the door? -could you open the door, please?
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
1 Phonetics and phonology ↔ red - read - read ;sleigh - slay
2 Morphology ↔ I/you/we/you/they walk - he/she/it walks;walked; walking
3 Syntax ↔ She ate a mammoth breakfast - She eating amammoth breakfast
4 Semantics ↔ book (verb) - book (noun);duck (verb) - duck (noun)
5 Pragmatics ↔ open the door - can you open the door? -could you open the door, please?
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
1 Phonetics and phonology ↔ red - read - read ;sleigh - slay
2 Morphology ↔ I/you/we/you/they walk - he/she/it walks;walked; walking
3 Syntax ↔ She ate a mammoth breakfast - She eating amammoth breakfast
4 Semantics ↔ book (verb) - book (noun);duck (verb) - duck (noun)
5 Pragmatics ↔ open the door - can you open the door? -could you open the door, please?
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
1 Phonetics and phonology ↔ red - read - read ;sleigh - slay
2 Morphology ↔ I/you/we/you/they walk - he/she/it walks;walked; walking
3 Syntax ↔ She ate a mammoth breakfast - She eating amammoth breakfast
4 Semantics ↔ book (verb) - book (noun);duck (verb) - duck (noun)
5 Pragmatics ↔ open the door - can you open the door? -could you open the door, please?
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
6 Discourse
Gracie: Oh yeah... And then Mr. and Mrs. Jones werehaving matrimonial trouble, and my brother was hired towatch Mrs. Jones.George: Well, I imagine she was a very attractive woman.Gracie: She was, and my brother watched her day andnight for six months.George: Well, what happened?Gracie: She finally got a divorce.George: Mrs. Jones?Gracie: No, my brother’s wife.
John went to Bill’s car dealership to check out anAcura Integra. He looked at it for about an hour.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
6 DiscourseGracie: Oh yeah... And then Mr. and Mrs. Jones werehaving matrimonial trouble, and my brother was hired towatch Mrs. Jones.George: Well, I imagine she was a very attractive woman.Gracie: She was, and my brother watched her day andnight for six months.George: Well, what happened?Gracie: She finally got a divorce.George: Mrs. Jones?Gracie: No, my brother’s wife.
John went to Bill’s car dealership to check out anAcura Integra. He looked at it for about an hour.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Six categories of linguistic knowledge
6 DiscourseGracie: Oh yeah... And then Mr. and Mrs. Jones werehaving matrimonial trouble, and my brother was hired towatch Mrs. Jones.George: Well, I imagine she was a very attractive woman.Gracie: She was, and my brother watched her day andnight for six months.George: Well, what happened?Gracie: She finally got a divorce.George: Mrs. Jones?Gracie: No, my brother’s wife.
John went to Bill’s car dealership to check out anAcura Integra. He looked at it for about an hour.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Ambiguities and Solutions
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Ambiguities and Solutions
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.
2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.
3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.
4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.
5 I waved my magic wand and turned her intoundifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
ExampleI made her duck.
Five possible interpretations:
1 I cooked waterfowl for her.2 I cooked waterfowl belonging to her.3 I created the (plaster?) duck she owns.4 I caused her to quickly lower her head or body.5 I waved my magic wand and turned her into
undifferentiated waterfowl.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
Morphological ambiguityduck : verb or nounher : dative pronoun or possessive pronoun
Syntactic ambiguity: make
transitive: taking a single direct object (case 2)ditransitive: taking two objects, meaning that the first object(her ) got made into the second object (duck )taking a direct object and a verb, meaning that the object(her ) got caused to perform the verbal action (duck )
Semantic ambiguity: makecookcreate
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
Morphological ambiguityduck : verb or nounher : dative pronoun or possessive pronoun
Syntactic ambiguity: make
transitive: taking a single direct object (case 2)ditransitive: taking two objects, meaning that the first object(her ) got made into the second object (duck )taking a direct object and a verb, meaning that the object(her ) got caused to perform the verbal action (duck )
Semantic ambiguity: makecookcreate
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
Morphological ambiguityduck : verb or nounher : dative pronoun or possessive pronoun
Syntactic ambiguity: make
transitive: taking a single direct object (case 2)ditransitive: taking two objects, meaning that the first object(her ) got made into the second object (duck )taking a direct object and a verb, meaning that the object(her ) got caused to perform the verbal action (duck )
Semantic ambiguity: makecookcreate
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Linguistic Ambiguities
Morphological ambiguityduck : verb or nounher : dative pronoun or possessive pronoun
Syntactic ambiguity: make
transitive: taking a single direct object (case 2)ditransitive: taking two objects, meaning that the first object(her ) got made into the second object (duck )taking a direct object and a verb, meaning that the object(her ) got caused to perform the verbal action (duck )
Semantic ambiguity: makecookcreate
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Corpus
DefinitionCorpus = Large and structured set of texts.
NLPTwo types of corpora:
Training corpus ↔ to make the list of rules or to get thestatistical dataTest corpus ↔ to test the results found with the trainingcorpus
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Corpus
DefinitionCorpus = Large and structured set of texts.
NLPTwo types of corpora:
Training corpus ↔ to make the list of rules or to get thestatistical dataTest corpus ↔ to test the results found with the trainingcorpus
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization
RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting
RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging
POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or Stemming
Implementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Topic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK,
...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Example with Penn Treebank POS-tags:
A/DT woman/NN came/VBD from/IN the/DT back/NN of/INthe/DT store/NN ./. She/PP appeared/VBD to/TO be/VB
sleepy/JJ and/CC quite/RB a/DT bit/NN younger/JJR than/INMr./NNP Dobbs/NNP and/CC to/TO be/VB wearing/VBG
too/RB much/RB makeup/NN ./.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Example with Penn Treebank POS-tags:
A/DT woman/NN came/VBD from/IN the/DT back/NN of/INthe/DT store/NN ./. She/PP appeared/VBD to/TO be/VB
sleepy/JJ and/CC quite/RB a/DT bit/NN younger/JJR than/INMr./NNP Dobbs/NNP and/CC to/TO be/VB wearing/VBG
too/RB much/RB makeup/NN ./.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Example with Penn Treebank POS-tags:
A/DT woman/NN came/VBD from/IN the/DT back/NN of/INthe/DT store/NN ./. She/PP appeared/VBD to/TO be/VB
sleepy/JJ and/CC quite/RB a/DT bit/NN younger/JJR than/INMr./NNP Dobbs/NNP and/CC to/TO be/VB wearing/VBG
too/RB much/RB makeup/NN ./.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Example of ambiguity:
1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.
2 People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.
2 People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.
2 People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
Three main tagging algorithms or methods:1 rule-based tagging, e.g. ENGTWOL2 stochastic tagging, e.g. HMM tagger3 transformation-based tagging, e.g. Brill tagger
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Rule-based POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Large database of hand-written disambiguation rules, e.g.:
TO + VB → YESTO + NN → NODT + NN → YESDT + VB → NO
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Rule-based POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Large database of hand-written disambiguation rules, e.g.:
TO + VB → YESTO + NN → NODT + NN → YESDT + VB → NO
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Rule-based POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Large database of hand-written disambiguation rules, e.g.:
TO + VB → YESTO + NN → NODT + NN → YESDT + VB → NO
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Rule-based POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Large database of hand-written disambiguation rules, e.g.:TO + VB → YESTO + NN → NODT + NN → YESDT + VB → NO
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Stochastic POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Training corpus to compute probability of given word havinggiven tag in given context, e.g.:
is/VBZ expected/VBN to/TO race/VB → 98%
is/VBZ expected/VBN to/TO race/NN → 2%
reason/NN for/IN the/DT race/NN → 97%
reason/NN for/IN the/DT race/VB → 3%
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Stochastic POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Training corpus to compute probability of given word havinggiven tag in given context, e.g.:
is/VBZ expected/VBN to/TO race/VB → 98%
is/VBZ expected/VBN to/TO race/NN → 2%
reason/NN for/IN the/DT race/NN → 97%
reason/NN for/IN the/DT race/VB → 3%
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Stochastic POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Training corpus to compute probability of given word havinggiven tag in given context, e.g.:
is/VBZ expected/VBN to/TO race/VB → 98%
is/VBZ expected/VBN to/TO race/NN → 2%
reason/NN for/IN the/DT race/NN → 97%
reason/NN for/IN the/DT race/VB → 3%
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Stochastic POS-tagging
Example of ambiguity:1 Secretariat/NNP is/VBZ expected/VBN to/TO race/VB
tomorrow/NN ./.2 People/NNS continue/VBP to/TO inquire/VB the/DT
reason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN./.
Training corpus to compute probability of given word havinggiven tag in given context, e.g.:
is/VBZ expected/VBN to/TO race/VB → 98%
is/VBZ expected/VBN to/TO race/NN → 2%
reason/NN for/IN the/DT race/NN → 97%
reason/NN for/IN the/DT race/VB → 3%
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:3 is/VBZ expected/VBN to/TO race/VB → 98%
reason/NN for/IN the/DT race/NN → 97%4 system takes race = NN or race = VB depending on
context.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:3 is/VBZ expected/VBN to/TO race/VB → 98%
reason/NN for/IN the/DT race/NN → 97%4 system takes race = NN or race = VB depending on
context.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:3 is/VBZ expected/VBN to/TO race/VB → 98%
reason/NN for/IN the/DT race/NN → 97%4 system takes race = NN or race = VB depending on
context.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:3 is/VBZ expected/VBN to/TO race/VB → 98%
reason/NN for/IN the/DT race/NN → 97%4 system takes race = NN or race = VB depending on
context.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:
3 is/VBZ expected/VBN to/TO race/VB → 98%reason/NN for/IN the/DT race/NN → 97%
4 system takes race = NN or race = VB depending oncontext.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:3 is/VBZ expected/VBN to/TO race/VB → 98%
reason/NN for/IN the/DT race/NN → 97%
4 system takes race = NN or race = VB depending oncontext.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Transformation-based tagging POS-tagging
Example of ambiguity:
Secretariat/NNP is/VBZ expected/VBN to/TO race/VBtomorrow/NN ./.People/NNS continue/VBP to/TO inquire/VB the/DTreason/NN for/IN the/DT race/NN for/IN outer/JJ space/NN
Rules automatically induced from data using Machine Learningtechniques, e.g.:
1 a priori, prob(race = NN)= 65%, prob(race = VB)= 35%→ system would always take race = NN
2 Machine Learning to learn conditional probabilities:3 is/VBZ expected/VBN to/TO race/VB → 98%
reason/NN for/IN the/DT race/NN → 97%4 system takes race = NN or race = VB depending on
context.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
POS-tagging
POS-tagging tools for English:Brill taggerStanford Log-linear POS-tagger (Java)POS-tagger integrated in GATE (Java)POS-tagger with NLTK (Python)
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Outline: Lecture 2
1 Recap: Typical NLP tasks → practical examples with GATE2 Def. of semantics3 Frames approach
1 FrameNet2 GATE for semantic/content analysis
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization
RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting
RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging
POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
English FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Spanish FrameNet Example
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
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 Introduction to Natural Language Processing in 3 Sessions
Outline: Lecture 3
1 Recap: Typical NLP tasks2 Automatic Question Answering3 Reference resolution4 Named Entity Recognition (NER)5 Keyword / topic / information extraction
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization
RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting
RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging
POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Basic and simpler tasks
Tokenization RegEx
Sentence splitting RegEx
POS-tagging POS-tagging algorithms andtag sets
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or Stemming
Implementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Typical NLP tasks: Complex tasks
Lemmatization or StemmingImplementations of PorterStemmer (e.g. in Java),
Stanford NLP tool, GATE, ...
Syntactic parsing
Early algorithm, CYKalgorithm, GHR algorithm,
Stanford Parser (Javaimplementation of
probabilistic algorithm)
Question answeringTopic extractionNERSemantic analysis...
Ad hoc tools, e.g.dictionaries, ontologies,Frames, GATE, NLTK, ...
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Ambiguities and Solutions
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NLP: Ambiguities and Solutions
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Question Answering
Example from Who’s on first
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Question Answering
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Simple Question Answering
ELIZAELIZA simulated a Rogerian psychologist, and could carry on
conversations with the user like the following:
User-1: Men are all alike.ELIZA-1: IN WHAT WAY
User-2: They’re always bugging us about something or other..ELIZA-2: CAN YOU THINK OF A SPECIFIC EXAMPLE
User-3: Well, my boyfriend made me come here.ELIZA-3: YOUR BOYFRIEND MADE YOU COME HERE
User-4: Yes, he says I’m depressed much of the time.ELIZA-4: I AM SORRY TO HEAR YOU ARE DEPRESSED.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
change all instances of my to YOUR, and I’m to YOU ARE, etc.,e.g.:
1 User-3: Well, my boyfriend made me come here.ELIZA-3: YOUR BOYFRIEND MADE YOU COME HERE
2 User-4: ... I’m depressed ... .ELIZA-4: ... YOU ARE DEPRESSED.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
change all instances of my to YOUR, and I’m to YOU ARE, etc.,e.g.:
1 User-3: Well, my boyfriend made me come here.ELIZA-3: YOUR BOYFRIEND MADE YOU COME HERE
2 User-4: ... I’m depressed ... .ELIZA-4: ... YOU ARE DEPRESSED.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
change all instances of my to YOUR, and I’m to YOU ARE, etc.,e.g.:
1 User-3: Well, my boyfriend made me come here.ELIZA-3: YOUR BOYFRIEND MADE YOU COME HERE
2 User-4: ... I’m depressed ... .ELIZA-4: ... YOU ARE DEPRESSED.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
relevant patterns in the input → creat an appropriate output;e.g.:
1 s/.* YOU ARE (depressed | sad) .*/I AM SORRY TO HEARYOU ARE \1 /
2 s/.* YOU ARE (depressed | sad) .*/WHY DO YOU THINKYOU ARE \1 /
3 s/.* all .*/IN WHAT WAY/4 s/.* always .*/CAN YOU THINK OF A SPECIFIC EXAMPLE/
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
relevant patterns in the input → creat an appropriate output;e.g.:
1 s/.* YOU ARE (depressed | sad) .*/I AM SORRY TO HEARYOU ARE \1 /
2 s/.* YOU ARE (depressed | sad) .*/WHY DO YOU THINKYOU ARE \1 /
3 s/.* all .*/IN WHAT WAY/4 s/.* always .*/CAN YOU THINK OF A SPECIFIC EXAMPLE/
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
relevant patterns in the input → creat an appropriate output;e.g.:
1 s/.* YOU ARE (depressed | sad) .*/I AM SORRY TO HEARYOU ARE \1 /
2 s/.* YOU ARE (depressed | sad) .*/WHY DO YOU THINKYOU ARE \1 /
3 s/.* all .*/IN WHAT WAY/4 s/.* always .*/CAN YOU THINK OF A SPECIFIC EXAMPLE/
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
relevant patterns in the input → creat an appropriate output;e.g.:
1 s/.* YOU ARE (depressed | sad) .*/I AM SORRY TO HEARYOU ARE \1 /
2 s/.* YOU ARE (depressed | sad) .*/WHY DO YOU THINKYOU ARE \1 /
3 s/.* all .*/IN WHAT WAY/
4 s/.* always .*/CAN YOU THINK OF A SPECIFIC EXAMPLE/
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
ELIZA
Regular expression substitutionsEliza worked by having a cascade of regular expression substitutionsthat each matched some part of the input lines and changed them:
relevant patterns in the input → creat an appropriate output;e.g.:
1 s/.* YOU ARE (depressed | sad) .*/I AM SORRY TO HEARYOU ARE \1 /
2 s/.* YOU ARE (depressed | sad) .*/WHY DO YOU THINKYOU ARE \1 /
3 s/.* all .*/IN WHAT WAY/4 s/.* always .*/CAN YOU THINK OF A SPECIFIC EXAMPLE/
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Discourse
Gracie: Oh yeah... And then Mr. and Mrs. Jones were havingmatrimonial trouble, and my brother was hired to watch Mrs. Jones.George: Well, I imagine she was a very attractive woman.Gracie: She was, and my brother watched her day and night for sixmonths.George: Well, what happened?Gracie: She finally got a divorce.George: Mrs. Jones?Gracie: No, my brother’s wife.
John went to Bill’s car dealership to check out an Acura Integra.He looked at it for about an hour.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Discourse
Gracie: Oh yeah... And then Mr. and Mrs. Jones were havingmatrimonial trouble, and my brother was hired to watch Mrs. Jones.George: Well, I imagine she was a very attractive woman.Gracie: She was, and my brother watched her day and night for sixmonths.George: Well, what happened?Gracie: She finally got a divorce.George: Mrs. Jones?Gracie: No, my brother’s wife.
John went to Bill’s car dealership to check out an Acura Integra.He looked at it for about an hour.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Discourse
Gracie: Oh yeah... And then Mr. and Mrs. Jones were havingmatrimonial trouble, and my brother was hired to watch Mrs. Jones.George: Well, I imagine she was a very attractive woman.Gracie: She was, and my brother watched her day and night for sixmonths.George: Well, what happened?Gracie: She finally got a divorce.George: Mrs. Jones?Gracie: No, my brother’s wife.
John went to Bill’s car dealership to check out an Acura Integra.He looked at it for about an hour.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
1 Reference phenomena2 Constraints on coreference3 Preferences in pronoun interpretation4 Example of algorithm for pronoun resolution
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
1 Reference phenomena
2 Constraints on coreference3 Preferences in pronoun interpretation4 Example of algorithm for pronoun resolution
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
1 Reference phenomena2 Constraints on coreference
3 Preferences in pronoun interpretation4 Example of algorithm for pronoun resolution
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
1 Reference phenomena2 Constraints on coreference3 Preferences in pronoun interpretation
4 Example of algorithm for pronoun resolution
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
1 Reference phenomena2 Constraints on coreference3 Preferences in pronoun interpretation4 Example of algorithm for pronoun resolution
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Reference phenomena
1 Indefinite noun phrases ↔ I saw an Honda Civic today.2 Definite noun phrases ↔ I saw an Honda Civic today.
The Honda Civic was blue.3 Pronouns ↔ I saw an Honda Civic today. It was blue.4 Demonstratives ↔ I bought an Honda Civic today. It’s
similar to the one I bought five years ago. That one wasreally nice, but I like this one even better.
5 One-anaphora ↔ I saw no less than 6 Honda Civicstoday. Now I want one.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Reference phenomena1 Indefinite noun phrases ↔ I saw an Honda Civic today.
2 Definite noun phrases ↔ I saw an Honda Civic today.The Honda Civic was blue.
3 Pronouns ↔ I saw an Honda Civic today. It was blue.4 Demonstratives ↔ I bought an Honda Civic today. It’s
similar to the one I bought five years ago. That one wasreally nice, but I like this one even better.
5 One-anaphora ↔ I saw no less than 6 Honda Civicstoday. Now I want one.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Reference phenomena1 Indefinite noun phrases ↔ I saw an Honda Civic today.2 Definite noun phrases ↔ I saw an Honda Civic today.
The Honda Civic was blue.
3 Pronouns ↔ I saw an Honda Civic today. It was blue.4 Demonstratives ↔ I bought an Honda Civic today. It’s
similar to the one I bought five years ago. That one wasreally nice, but I like this one even better.
5 One-anaphora ↔ I saw no less than 6 Honda Civicstoday. Now I want one.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Reference phenomena1 Indefinite noun phrases ↔ I saw an Honda Civic today.2 Definite noun phrases ↔ I saw an Honda Civic today.
The Honda Civic was blue.3 Pronouns ↔ I saw an Honda Civic today. It was blue.
4 Demonstratives ↔ I bought an Honda Civic today. It’ssimilar to the one I bought five years ago. That one wasreally nice, but I like this one even better.
5 One-anaphora ↔ I saw no less than 6 Honda Civicstoday. Now I want one.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Reference phenomena1 Indefinite noun phrases ↔ I saw an Honda Civic today.2 Definite noun phrases ↔ I saw an Honda Civic today.
The Honda Civic was blue.3 Pronouns ↔ I saw an Honda Civic today. It was blue.4 Demonstratives ↔ I bought an Honda Civic today. It’s
similar to the one I bought five years ago. That one wasreally nice, but I like this one even better.
5 One-anaphora ↔ I saw no less than 6 Honda Civicstoday. Now I want one.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Reference phenomena1 Indefinite noun phrases ↔ I saw an Honda Civic today.2 Definite noun phrases ↔ I saw an Honda Civic today.
The Honda Civic was blue.3 Pronouns ↔ I saw an Honda Civic today. It was blue.4 Demonstratives ↔ I bought an Honda Civic today. It’s
similar to the one I bought five years ago. That one wasreally nice, but I like this one even better.
5 One-anaphora ↔ I saw no less than 6 Honda Civicstoday. Now I want one.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Constraints on coreference
1 number agreement ↔ John has a new car. It is red. /John has a new car. They are red.
2 person and case agreement ↔ John and Mary have newcars. They love them.
3 gender agreement ↔ John has a new car. It is attractive./ John has a new car. He is attractive.
4 syntactic constraints ↔ John bought himself a new car. /John bought him a new car.
5 selectional restrictions ↔ John parked his car in thegarage. He had driven it around for hours.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Constraints on coreference1 number agreement ↔ John has a new car. It is red. /
John has a new car. They are red.
2 person and case agreement ↔ John and Mary have newcars. They love them.
3 gender agreement ↔ John has a new car. It is attractive./ John has a new car. He is attractive.
4 syntactic constraints ↔ John bought himself a new car. /John bought him a new car.
5 selectional restrictions ↔ John parked his car in thegarage. He had driven it around for hours.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Constraints on coreference1 number agreement ↔ John has a new car. It is red. /
John has a new car. They are red.2 person and case agreement ↔ John and Mary have new
cars. They love them.
3 gender agreement ↔ John has a new car. It is attractive./ John has a new car. He is attractive.
4 syntactic constraints ↔ John bought himself a new car. /John bought him a new car.
5 selectional restrictions ↔ John parked his car in thegarage. He had driven it around for hours.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Constraints on coreference1 number agreement ↔ John has a new car. It is red. /
John has a new car. They are red.2 person and case agreement ↔ John and Mary have new
cars. They love them.3 gender agreement ↔ John has a new car. It is attractive.
/ John has a new car. He is attractive.
4 syntactic constraints ↔ John bought himself a new car. /John bought him a new car.
5 selectional restrictions ↔ John parked his car in thegarage. He had driven it around for hours.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Constraints on coreference1 number agreement ↔ John has a new car. It is red. /
John has a new car. They are red.2 person and case agreement ↔ John and Mary have new
cars. They love them.3 gender agreement ↔ John has a new car. It is attractive.
/ John has a new car. He is attractive.4 syntactic constraints ↔ John bought himself a new car. /
John bought him a new car.
5 selectional restrictions ↔ John parked his car in thegarage. He had driven it around for hours.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Constraints on coreference1 number agreement ↔ John has a new car. It is red. /
John has a new car. They are red.2 person and case agreement ↔ John and Mary have new
cars. They love them.3 gender agreement ↔ John has a new car. It is attractive.
/ John has a new car. He is attractive.4 syntactic constraints ↔ John bought himself a new car. /
John bought him a new car.5 selectional restrictions ↔ John parked his car in the
garage. He had driven it around for hours.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Preferences in pronoun interpretation
1 recency ↔ Peter has an Audi. Bob has a Honda. Annelikes to drive it.
2 grammatical role ↔ Peter went to the Honda dealershipwith Bob. He bought a Civic. / Bob went to the Hondadealership with Peter. He bought a Civic.
3 repeated mention ↔ Anne needed a car to drive to hernew job. She decided she wanted something roomy. Carolwent to the Honda dealership with her. She bought a Civic.
4 parallelism ↔ Anne went with Carol to the Hondadealership. Sally went with her to the VW dealership.
5 verb semantics ↔ Peter seized the Honda pamphlet fromBob. He loves reading about cars. / Peter passed theHonda pamphlet to Bob. He loves reading about cars.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Preferences in pronoun interpretation1 recency ↔ Peter has an Audi. Bob has a Honda. Anne
likes to drive it.
2 grammatical role ↔ Peter went to the Honda dealershipwith Bob. He bought a Civic. / Bob went to the Hondadealership with Peter. He bought a Civic.
3 repeated mention ↔ Anne needed a car to drive to hernew job. She decided she wanted something roomy. Carolwent to the Honda dealership with her. She bought a Civic.
4 parallelism ↔ Anne went with Carol to the Hondadealership. Sally went with her to the VW dealership.
5 verb semantics ↔ Peter seized the Honda pamphlet fromBob. He loves reading about cars. / Peter passed theHonda pamphlet to Bob. He loves reading about cars.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Preferences in pronoun interpretation1 recency ↔ Peter has an Audi. Bob has a Honda. Anne
likes to drive it.2 grammatical role ↔ Peter went to the Honda dealership
with Bob. He bought a Civic. / Bob went to the Hondadealership with Peter. He bought a Civic.
3 repeated mention ↔ Anne needed a car to drive to hernew job. She decided she wanted something roomy. Carolwent to the Honda dealership with her. She bought a Civic.
4 parallelism ↔ Anne went with Carol to the Hondadealership. Sally went with her to the VW dealership.
5 verb semantics ↔ Peter seized the Honda pamphlet fromBob. He loves reading about cars. / Peter passed theHonda pamphlet to Bob. He loves reading about cars.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Preferences in pronoun interpretation1 recency ↔ Peter has an Audi. Bob has a Honda. Anne
likes to drive it.2 grammatical role ↔ Peter went to the Honda dealership
with Bob. He bought a Civic. / Bob went to the Hondadealership with Peter. He bought a Civic.
3 repeated mention ↔ Anne needed a car to drive to hernew job. She decided she wanted something roomy. Carolwent to the Honda dealership with her. She bought a Civic.
4 parallelism ↔ Anne went with Carol to the Hondadealership. Sally went with her to the VW dealership.
5 verb semantics ↔ Peter seized the Honda pamphlet fromBob. He loves reading about cars. / Peter passed theHonda pamphlet to Bob. He loves reading about cars.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Preferences in pronoun interpretation1 recency ↔ Peter has an Audi. Bob has a Honda. Anne
likes to drive it.2 grammatical role ↔ Peter went to the Honda dealership
with Bob. He bought a Civic. / Bob went to the Hondadealership with Peter. He bought a Civic.
3 repeated mention ↔ Anne needed a car to drive to hernew job. She decided she wanted something roomy. Carolwent to the Honda dealership with her. She bought a Civic.
4 parallelism ↔ Anne went with Carol to the Hondadealership. Sally went with her to the VW dealership.
5 verb semantics ↔ Peter seized the Honda pamphlet fromBob. He loves reading about cars. / Peter passed theHonda pamphlet to Bob. He loves reading about cars.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Reference resolution
Preferences in pronoun interpretation1 recency ↔ Peter has an Audi. Bob has a Honda. Anne
likes to drive it.2 grammatical role ↔ Peter went to the Honda dealership
with Bob. He bought a Civic. / Bob went to the Hondadealership with Peter. He bought a Civic.
3 repeated mention ↔ Anne needed a car to drive to hernew job. She decided she wanted something roomy. Carolwent to the Honda dealership with her. She bought a Civic.
4 parallelism ↔ Anne went with Carol to the Hondadealership. Sally went with her to the VW dealership.
5 verb semantics ↔ Peter seized the Honda pamphlet fromBob. He loves reading about cars. / Peter passed theHonda pamphlet to Bob. He loves reading about cars.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:
1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:
1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:1 detection of names
2 classification of the names by the type of entity to whichthey refer → 4 standard types:
1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:
1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)
2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)
3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,”Barcelona”, etc.)
4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)
4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Named Entity Recognition
Can be broken down in two distinct problems, i.e.:1 detection of names2 classification of the names by the type of entity to which
they refer → 4 standard types:1 person (e.g. ”Carol”, ”Tom Hanks”, etc.)2 organization (e.g. ”WWF”, IBM”, ”Bank of America”, etc.)3 location (e.g. ”London”, "Washington D.C.”, ”L.A.”,
”Barcelona”, etc.)4 other (e.g. ”Hotel Sunshine”, etc. )
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
NER
Tools for Named Entity RecognitionGATE for English, Spanish, and many more, via graphicalinterface and Java API (development at the University ofSheffield, UK)https://gate.ac.uk/NETagger: Java based Illinois Named Entity Recognition(development by Cognitive Computation Group at University ofIllinois at Urbana - Champaign)http://cogcomp.cs.illinois.edu/page/software_view/NETaggerOpenNLP: rule based and statistical Named Entity Recognition(development by Apache)http://opennlp.apache.org/index.htmlStanford CoreNLP: Java-based CRF Named Entity Recognition(development by Stanford Natural Language Processing Group)http://nlp.stanford.edu/software/CRF-NER.shtml
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Keyword / topic / information extraction
ToolsKeyword extraction: e.g. GATE (ANNIE tool) for English,Spanish, and many more, via graphical interface and JavaAPI→ simply using jape files for the LUstool from Volker ?Topic / information extraction: e.g. GATE (ANNIE tool)for English, Spanish, and many more, via graphicalinterface and Java API→ using jape files for the LUs, FEs, and FRAMES
GATEhttps://gate.ac.uk/
development at the University of Sheffield, UK
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions
Thank you for your attention!
For more information:
Example text book: Speech and Language Processingby D. Jurafsky and J. H. Martin
Web page: www.alexandramliguoriphd.com
Linkedin profile: Alexandra M. Liguori, Ph.D.
Dr. Alexandra M. Liguori Introduction to Natural Language Processing in 3 Sessions