2. Perpectivising NLP: Areas of AI and
their inter-dependencies
Knowledge
Search Logic Representation
Machine
Learning
Planning
Expert
NLP Vision Robotics Systems
3. Two pictures
Problem
NLP
Semantics NLP
nity
Parsing
Vision Speech Morph
Analysis
HM
M Statistics and Probability Hindi English
Language
CRF +
Knowledge Based
MEM
M
Algorithm
N
Tri
Part of Speech
Tagging
Marathi French
4. What it is
POS Tagging is a process that attaches
each word in a sentence with a suitable
tag from a given set of tags.
The set of tags is called the Tag-set.
Standard Tag-set : Penn Treebank (for
English).
5. Definition
Tagging is the assignment of a
singlepart-of-speech tag to each word
(and punctuation marker) in a corpus.
“_“ The_DT guys_NNS that_WDT
make_VBP traditional_JJ hardware_NN
are_VBP really_RB being_VBG
obsoleted_VBN by_IN microprocessor-based_
JJ machines_NNS ,_, ”_” said_VBD
Mr._NNP Benton_NNP ._.
6. POS Tags
NN – Noun; e.g.
VM – Main Verb;
Dog_NN
e.g. Run_VM
VAUX – AuxiliaryVerb; e.g. Is_VAUX
JJ – Adjective; e.g. Red_JJ
PRP – Pronoun; e.g. You_PRP
NNP– Proper Noun; e.g. John_NNP
etc.
7. POS Tag Ambiguity
In English : I bank1 on the bank2 on the
river bank3 for
Bank1 is verb,
my transactions.
the other two banks are
noun
In Hindi :
”Khaanaa” : can be noun (food) or
eat)
verb (to
8. For Hindi
Rama achhaa gaata hai. (hai is VAUX :
Auxiliary verb); Ram sings well
Rama achha ladakaa hai. (hai is VCOP :
Copula verb); Ram is a good boy
9. Process
List all possible tag for each word in
sentence.
Choose best suitable tag sequence.
10. Example
”People jump high”.
People : Noun/Verb
jump : Noun/Verb
high : Noun/Verb/Adjective
We can start with probabilities.
11.
12. Importance of POS tagging
Ack: presentation by Claire
Gardent on POS tagging by NLTK
13. What is Part of Speech (POS)
Words can be divided into classes
behave similarly.
Traditionally eight parts of speech
that
in
English: noun, verb, pronoun,
preposition, adverb,
adjective and article
More recently larger
conjunction,
sets have been
used: e.g. Penn Treebank (45 tags),
Susanne (353 tags).
14. Why POS
POS tell us a lot about a word (and the
words near it).
E.g, adjectives often followed by nouns
personal pronouns often followed by verbs
possessive pronouns by nouns
Pronunciations depends on POS, e.g.
object (first syllable NN, second syllable
VM), content, discount
First step in many NLP applications
15. Categories of POS
Open and closed classes
Closed classes have a fixed membership of
words: determiners, pronouns, prepositions
Closed class words are usually function
word: frequently occurring,
grammatically important, often short
(e.g. of, it, the, in)
Open classes: nouns, verbs, adjectives
and adverbs(allow new addition of word)
16. Open Class (1/2)
Nouns:
Proper nouns (Scotland, BBC),
common nouns
count nouns (goat, glass)
mass nouns (snow, pacifism)
Verbs:
actions and processes (run, hope)
also auxiliary verbs (is, are, am, will, can)
17. Open Class (2/2)
Adjectives:
properties and qualities
value)
Adverbs:
(age, colour,
modify verbs, or verb phrases, or other
adverbs- Unfortunately John walked home
extremely slowly yesterday
Sentential adverb: unfortunately
Manner adverb: extremely, slowly
Time adverb: yesterday
18. Closed class
Prepositions: on, under, over, to, with,
by
Determiners: the, a, an, some
Pronouns: she, you, I, who
Conjunctions: and, but, or, as, when, if
Auxiliary verbs: can, may, are
30. Lexical Probability Assumption
P(W|T) = P(w0|t0-tn+1)P(w1|w0t0-tn+1)P(w2|w1w0t0-tn+1) …
P(wn|w0-wn-1t0-tn+1)P(wn+1|w0-wnt0-tn+1)
Assumption: A word is determined completely by
inspired by speech recognition
its tag. This is
= P(wo|to)P(w1|t1) … P(wn+1|tn+1)
n+1
=Π P(wi|ti)
i = 0
n+1
= Π P(wi|ti)
i = 1
(Lexical Probability Assumption)
31. Generative Model
^_^ People_N Jump_V High_R ._
.
Lexical
Probabilit
ies
^ N V A .
V N N Bigram
Probabilit
ies
A A N
This model is called Generative model.
Here words are observed from tags as states.
This is similar to HMM.