View
219
Download
0
Category
Preview:
Citation preview
8/2/2019 Dr. GV. Uma 2
1/50
NaturalLanguageProcessing
whatit
does
whatisinvolved
whyisitdifficult
briefhistor
8/2/2019 Dr. GV. Uma 2
2/50
sentencef structuredrepnsofmeaning
" " . Lisp:
(query
(file
detail
'date
"C:/help3.doc"))
"thelargecatchasedtherat" 1 1 1 1
L (E1s2 rodent(s2))L chased(s1,s2 )
"theyoungboyateabadapple" ... ...
8/2/2019 Dr. GV. Uma 2
3/50
8/2/2019 Dr. GV. Uma 2
4/50
whatisinvolved
ie:symbols
manipulated
by
symbol
processors
search&inference
knowledgerepresentationtechniques
8/2/2019 Dr. GV. Uma 2
5/50
whyisitdifficult
prejudice,politics,
etc
ambiguity...
s ntactic
semantic
8/2/2019 Dr. GV. Uma 2
6/50
examplesentences
theold
man
the
boats
mycardrinkspetrol
IsawtheEiffelTowerflyingtoParis
heo ened
the
door
with
the
ke
heopenedthedoorwiththesqueakinghinge
theboykickedtheballunderthetree
theboy
kicked
the
wall
under
the
tree
putthebottlesintheboxontheshelfbythedoor
8/2/2019 Dr. GV. Uma 2
7/50
(brief)historyoflanguageprocessing
1950s Russian
f Englishtranslation
1956 Chomsky
1960s Patternmatching
1970s Parsin
&some
KnRe
1980s Kn&inference
2000+ quietlypromising
8/2/2019 Dr. GV. Uma 2
8/50
8/2/2019 Dr. GV. Uma 2
9/50
matchin :Student
8/2/2019 Dr. GV. Uma 2
10/50
matchin :Elisa
8/2/2019 Dr. GV. Uma 2
11/50
amodern inputsentenceapproach
morphological
processing
syntax
analysis
lexicon
semanticanal sis
grammar
semantic
rules
pragmaticcontextualana ys s
tar et
information
representation
8/2/2019 Dr. GV. Uma 2
12/50
8/2/2019 Dr. GV. Uma 2
13/50
morphologicalprocessing
notes
all(?)spoken
lngs
exhibit
morphology
easiertohandleinwrittenlngsifnoticonic
somemorphologydescribesinfmbeyondsyntax
e : roximit Tamil
Setswana
etc
case
8/2/2019 Dr. GV. Uma 2
14/50
mor holo exam les
Noun + Suffix S ntactic case Meanin
Chennai-ukku dative: destination To Madras
Chennai-ukku-irundu dative: source From MadrasChennai-le containment In Madras
Chennai-ai object (formal) Madras
Fig. 2.2. Suffix Attachment for Noun Cases (Tamil author's spelling)
Proximity Time Things (inanimate)ear -ppa t s t me: now -n t a t s t ng: t s
Far a-ppa (that time: then) a-ndtha (that thing: that)
Question e-ppa (what time: when) e-ndtha (what thing: which)
Fig. 2.3. Proximity Information as Prefix Tags (Tamil)
Proximity Cow Student
Near Speaker kgomo e (this cow) mo-ithuti yo (this student)
Near Listener k omo e-o that cow mo-ithuti o-o that student
Far kgomo e-le (that cow) mo-ithuti yo-le (that student)
Fig. 2.4. Proximity by Demostrative Pronoun Inflection (Setswana)
8/2/2019 Dr. GV. Uma 2
15/50
step2
syntaxanalysis
objectives: 1 checkfor
correctness
2 producephrasestructure
uses
parser arulebasedsearchengine
lexicon dictionaryofwords&theircategories
8/2/2019 Dr. GV. Uma 2
16/50
syntaxrules
partsof
speech
cons er
thecatchasesthemouse
alllarge
black
dogs
chase
cats
8/2/2019 Dr. GV. Uma 2
17/50
example1
using
Lkit
(build-lexicon
'((a determiner) (cat noun) (dog noun)
(build-grammar'((s1 (sentence -> noun-phrase verb-phrase))
(np (noun-phrase -> determiner noun))
(vp (verb-phrase -> verb noun-phrase))
))
8/2/2019 Dr. GV. Uma 2
18/50
example1
output
(parse 'sentence '(the dog chased a cat))
complete-edge 0 5 s1 sentence (the dog ...) nil
- - -
Syntax
(sentence(noun-phrase (determiner the) (noun dog))
(verb-phrase
(verb chased)
(noun-phrase (determiner a) (noun cat))))
Semantics
8/2/2019 Dr. GV. Uma 2
19/50
sowhat?
wewantmean ng
8/2/2019 Dr. GV. Uma 2
20/50
Remember:"theyoungboyateabadapple"
howcan
semantics
be
encoded
as
symbols?
young/old,happy/sad,good/bad?
owcansemant cs egenerate
whatcanbeinferredfromsemantics?
8/2/2019 Dr. GV. Uma 2
21/50
Reminder:
"theyoungboyateabadapple"
8/2/2019 Dr. GV. Uma 2
22/50
symbolicrepresentation
of
semantics
(actor (root boy) (id boy#732)
(tags animate human male)
(quant specific))
(action (primitve INGEST))(object (root apple) (id nil)
(tags physob veg fruit food)
(qual (phy-state -4))
(quant non-specific))
8/2/2019 Dr. GV. Uma 2
23/50
semanticsin
lexicon
asimpleexample(build-lexicon
'((a det any )
(chased verb hunts )
(dog noun canine )
(the det specific)))
8/2/2019 Dr. GV. Uma 2
24/50
semanticsin
grammar
rules
(s1 (sentence -> noun-phrase verb-phrase)
(actor . noun-phrase)
action . verb- hrase.action
(object . verb-phrase.object)
)
- -
(det . noun)
)
(vp (verb-phrase -> verb noun-phrase)(action . verb)
(object . noun-phrase)
)
8/2/2019 Dr. GV. Uma 2
25/50
semantics
results
(parse 'sentence '(the dog chased a cat))
complete-edge 0 5 s1 sentence (the dog...) nil
s1 sentence -> (noun- hrase verb- hrase)
Syntax
(sentence (noun-phrase (det the) (noun dog))
-
(noun-phrase (det a) (noun cat))))
Semantics
(sentence (actor (specific canine))(action hunts)
(object (any feline)))
8/2/2019 Dr. GV. Uma 2
26/50
semanticsin
lexicon
checks
1
(a det (sems . any))
(all det (sems . every))
. .
(cats noun (sems . feline) (num . plur))
(chase verb (sems . hunts) (num . plur))(chases verb (sems . hunts) (num . sing))
(dog noun (sems . canine) (num . sing))
(dogs noun (sems . canine) (num . plur))
(the det (sems . specific))
8/2/2019 Dr. GV. Uma 2
27/50
semanticsin
grammar
checks
1
(s1 (sentence -> noun-phrase verb-phrase)
(actor . noun-phrase.sems)
action . verb- hrase.action
(object . verb-phrase.object)
; check number of noun-phrase & verb-phrase
- .
= verb-phrase.number)
numeric-agreement-ok
numeric-agreement-bad)
)
8/2/2019 Dr. GV. Uma 2
28/50
semantics
results
(parse 'sentence '(the dog chases a cat))
complete-edge 0 5 s1 sentence (the dog...) nil
s1 sentence -> (noun- hrase verb- hrase)
Syntax
(sentence (noun-phrase (det the) (noun dog))
-
(noun-phrase (det a) (noun cat))))
Semantics
(sentence (actor specific canine)(action . hunts)
(object any feline)
numeric-agreement-ok)
8/2/2019 Dr. GV. Uma 2
29/50
semantics
results
(parse 'sentence '(the dogs chases a cat))
complete-edge 0 5 s1 sentence (the dog...) nil
s1 sentence -> (noun- hrase verb- hrase)
Syntax
(sentence (noun-phrase (det the) (noun dog))
-
(noun-phrase (det a) (noun cat))))
Semantics
(sentence (actor specific canine)(action . hunts)
(object any feline)
numeric-agreement-bad)
8/2/2019 Dr. GV. Uma 2
30/50
semanticsin
grammar
checks
2
(s1 (sentence -> noun-phrase verb-phrase)
(fail if noun-phrase.number
/= verb- hrase.number
(actor . noun-phrase.sems)
(action . verb-phrase.action)
. - .
)
8/2/2019 Dr. GV. Uma 2
31/50
semantics
results
(parse 'sentence '(the dog chases a cat))
Semantics
sentence actor s ecific canine
(action . hunts)
(object any feline))
(parse 'sentence '(the dogs chases a cat))
.... failed ....
8/2/2019 Dr. GV. Uma 2
32/50
semanticsin
grammar
checks
3
(s1 (sentence -> noun-phrase verb-phrase)
(glitch numeric-agreement
if not noun- hrase.number
= verb-phrase.number)
(actor . noun-phrase.sems)
. - .
(object . verb-phrase.object)
)
8/2/2019 Dr. GV. Uma 2
33/50
semantics
results
(parse 'sentence '(the dogs chases a cat))
complete-edge 0 5 s1 sentence (the dogs...) nil
Glitches: numeric-a reement
s1 sentence -> (noun-phrase verb-phrase)
Syntax
-
(verb-phrase (verb chases)
(noun-phrase (det a) (noun cat))))
Semantics(sentence (actor specific canine)
(action . hunts)
(object any feline))
8/2/2019 Dr. GV. Uma 2
34/50
example2
lexicon
(a det any )
(cat noun feline )
(chase verb hunts )
(dog noun canine )
(the det specific)(black adj (color black))
(large adj (size 7/10))
(small adj (size 3/10))
8/2/2019 Dr. GV. Uma 2
35/50
example2
grammar
(build-grammar
' n noun- hrase -> ?det *ad noun
(if det
(quantification . det)
(qualifiers . *.adj)
(object . noun)
))))
8/2/2019 Dr. GV. Uma 2
36/50
example2
results
(parse 'noun-phrase '(small black dog))
complete-edge 0 3 np noun-phrase (small...) nil
n noun- hrase -> (?det *ad noun)
Syntax
(noun-phrase (adj small) (adj black) (noun dog))
(noun-phrase
(quantification undefined)
(qualifiers ((size . 3/10)) ((color . black)))(object canine))
8/2/2019 Dr. GV. Uma 2
37/50
example2
results
small dogs chase the small cats
and large dogs chase the large cats
(sentence conjunction
.
(object . canine))
(action . hunts)
o ect quant . spec c qua s ze .
(object . feline)))
((actor (quant undefined) (qual (size . 7/10))
(object . canine))(action . hunts)
(object . feline))))
8/2/2019 Dr. GV. Uma 2
38/50
semanticprocessing
(one
approach)
semantic
rules
in
grammarf
1st
stage
case
frame
verbformf primitiveactioncaseframe
disambiguate&
fill
additional
case
frame
slots
checkreferenceswithworldand/ordialog
dostatementlevelinference
integratewith
dialog
doeventse uencedialo
8/2/2019 Dr. GV. Uma 2
39/50
step1:
produce
raw
case
frame
verb
casesthecatchasedtheratinthekitchen
thecatchasedtheratintothekitchen
commoncases
source starttime instrument
destination endtime beneficiary
location duration
8/2/2019 Dr. GV. Uma 2
40/50
theambiguity
problem
eg:
the
boy
kicked
the
ball
under
the
tree
grammarrules
Sf SPP
f
NP f ?det *adj noun
8/2/2019 Dr. GV. Uma 2
41/50
exampleframe
#1
actor (quant specific)
(tags animate male human)
(root boy)
action (root kick)
object (root ball)
(tags manip)
(posn-relative
(locator beneath)(object (root tree)
... ...
8/2/2019 Dr. GV. Uma 2
42/50
exampleframe
#2
actor (quant specific)
(tags animate male human)
(root boy)
action (root kick)
object (root ball)
(tags manip)
dest (posn-relative
(locator beneath)(object (root tree)
... ...
8/2/2019 Dr. GV. Uma 2
43/50
exampleverb
form
#1
primitive strike
slots instrument (part-of $actor foot)
legal start-time, end-time, duration
instrument, beneficiary, location
illegal source, dest
8/2/2019 Dr. GV. Uma 2
44/50
exampleverb
form
#2
primitive push
slots instrument (part-of $actor foot)
legal source, dest, start-time, end-time,
instr, beneficiary, locatn, duration
8/2/2019 Dr. GV. Uma 2
45/50
8/2/2019 Dr. GV. Uma 2
46/50
integrationwith
dialog
dialogshave...
players(actors)
props(objects)
locations
fromcase
frames
themes(derived)
plans(from
themes
and/or
derived)
8/2/2019 Dr. GV. Uma 2
47/50
eventsequence
setof...
players(actors)
props(objects)
seriesof...
escapes,exceptions
&
alternatives
8/2/2019 Dr. GV. Uma 2
48/50
readin rammars etc
A good source of links & references...
Computational Analysis of Prepositions http://knol.google.com/k/abdul-baqi-sharaf/computational-analysis-of-prepositions/3hc3uny2z7r41/4#
if you only plan to read one article...
Baldwin, T. Kordoni, V and Villavicencio, A. 2009. Prepositions in Applications: ASurvey and Introduction to the Special Issue ". Computational Linguistics 35 (2):119149.
also...
Litkowski, Kenneth C. and Orin Hargraves. 2007. SemEval-2007 task 06: Word-sense disambiguation of prepositions. In Proceedings of the 4th InternationalWorkshop on Semantic Evaluations, pages 2429, Prague.
Disambiguation of Preposition Sense Using Linguistically MotivatedFeatures, Stephen Tratz and Dirk Hovy. Proceedings of the NAACL HLT StudentResearch Workshop and Doctoral Consortium, pages 96100,
ou er, o ora o, une . c ssoc a on or ompu a ona ngu s cs
8/2/2019 Dr. GV. Uma 2
49/50
,the NLP dictionary: www.cse.unsw.edu.au/~billw/nlpdict.html
for practical help with building grammars check the following (it is about 10 years
old but then so is the English language :o)A Grammar Writers Cookbook. Miriam Butt, Tracy Holloway King, Marma-EugeniaNio and Fridirique Segond
also (for writing larger grammars) it is useful to find a book on grammar for tutorsand/or students of English as a second language.
for a broad (if a little formal) take on semantics try dipping into...
Semantics-Oriented Natural Language Processing Mathematical Models andAlgorithms. Vladimir Fomichov A. 2010
8/2/2019 Dr. GV. Uma 2
50/50
logic and knowledge representation a guide
htt : ds ace.dsto.defence. ov.au ds ace bitstream 1947 9996 1 DSTO-TR-2324%20PR.pdf
representing events for NLP
htt : www. oo le.co.uk url?sa=t&rct= & =knowled e%20re resentation%20%22representing%20events%22&source=web&cd=6&sqi=2&ved=0CEgQFjAF&url=http%3A%2F%2Fwww.aaai.org%2Focs%2Findex.php%2FFSS%2FFSS10%2Fpaper%2Fdownload%2F2183%2F2819&ei=f6oWT_e7DeKC4gTMpaijBA&usg=AFQjC
NFYmurwJR9oqfCRBimVprWRK45kew&cad=rja
semantic networks & frames (2005)
http://www.cs.bham.ac.uk/~jxb/IAI/w6.pdf
VERL: An Ontology Framework for Video Events (2005)
http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1524892
Recommended