Presentation on theme: "Natural Language Processing what it does what is involved why is it difficult brief history."— Presentation transcript:
Natural Language Processing what it does what is involved why is it difficult brief history
sentence structured rep n s of meaning "how old is my help3.doc file?" Lisp: (query (file-detail 'date "C:/help3.doc")) "the large cat chased the rat" Logic: ( 1 s 1 large(s 1 ) feline(s 1 )) ( 1 s 2 rodent(s 2 )) chased(s 1, s 2 ) "the young boy ate a bad apple" CD Graph...see next page...
CD graph "the young boy ate a bad apple"
what is involved symbolic computation ie: symbols manipulated by symbol processors search & inference knowledge representation techniques
prejudice, politics, etc ambiguity... syntactic semantic pragmatic why is it difficult
example sentences the old man the boats my car drinks petrol I saw the Eiffel Tower flying to Paris he opened the door with the key he opened the door with the squeaking hinge the boy kicked the ball under the tree the boy kicked the wall under the tree put the bottles in the box on the shelf by the door
1950sRussian English translation 1956Chomsky 1960sPattern matching 1970sParsing & some KnRep 1980sKn & inference 1990sbig dreams small results 2000+quietly promising (brief) history of language processing
a modern approach input sentence syntax analysis (parsing) semantic analysis pragmatic analysis target representation grammar lexicon semantic rules contextual information morphological processing
morphological processing - notes all(?) spoken lngs exhibit morphology easier to handle in written lngs if not iconic some morphology describes infm beyond syntax eg:proximity(Tamil, Setswana, etc) case speaker / listener peer relationship
step 2- syntax analysis objectives:1check for correctness 2produce phrase structure uses parsera rule-based search engine grammarcontext-free production rules lexicondictionary of words & their categories
syntax rules parts of speech rules of combination consider the cat chases the mouse all large black dogs chase cats
example 1 - output (parse 'sentence '(the dog chased a cat)) complete-edge 0 5 s1 sentence (the dog...) nil s1 sentence -> (noun-phrase verb-phrase) Syntax (sentence (noun-phrase (determiner the) (noun dog)) (verb-phrase (verb chased) (noun-phrase (determiner a) (noun cat)))) Semantics (sentence)
so what ? we want meaning
Remember: "the young boy ate a bad apple" how can semantics be encoded as symbols? the boy / an apple? young/old, happy/sad, good/bad? how can semantics be generated? what can be inferred from semantics?
Reminder: "the young boy ate a bad apple"
symbolic representation of semantics (actor (root boy) (id boy#732) (tags animate human male) (qual (age (val 5) (approx 3))) (quant specific)) (action (primitve INGEST)) (object (root apple) (id nil) (tags physob veg fruit food) (qual (phy-state -4)) (quant non-specific))
semantics in lexicon a simple example (build-lexicon '((a det any ) (cat noun feline ) (chased verb hunts ) (dog noun canine ) (the det specific) ))
example 2 - results small dogs chase the small cats and large dogs chase the large cats (sentence conjunction ((actor (quant undefined) (qual (size. 3/10)) (object. canine)) (action. hunts) (object (quant. specific) (qual (size. 3/10)) (object. feline))) ((actor (quant undefined) (qual (size. 7/10)) (object. canine)) (action. hunts) (object (quant. specific) (qual (size. 7/10)) (object. feline))))
semantic processing (one approach) semantic rules in grammar 1st stage case frame verb form primitive action case frame disambiguate & fill additional case frame slots check references with world and/or dialog do statement level inference integrate with dialog do event sequence dialog
step-1: produce raw case frame verb cases the cat chased the rat in the kitchen the cat chased the rat into the kitchen common cases sourcestart-timeinstrument destinationend-timebeneficiary locationduration
the ambiguity problem eg: the boy kicked the ball under the tree grammar rules S S PP S NP VP NP ?det *adj noun NP NP PP
semantic processing (one approach) ×semantic rules in grammar 1st stage case frame ×verb form primitive action case frame ×disambiguate & fill additional case frame slots Þcheck references with world and/or dialog Þdo statement level inference integrate with dialog do event sequence dialog
event sequence set of... players (actors) props (objects) series of... semantically encoded activities (matched) escapes, exceptions & alternatives
reading – grammars, etc A good source of links & references... “Computational Analysis of Prepositions” sharaf/computational-analysis-of-prepositions/3hc3uny2z7r41/4# if you only plan to read one article... Baldwin, T. Kordoni, V and Villavicencio, A Prepositions in Applications: A Survey and Introduction to the Special Issue ". Computational Linguistics 35 (2): 119–149. also... Litkowski, Kenneth C. and Orin Hargraves SemEval-2007 task 06: Word- sense disambiguation of prepositions. In Proceedings of the 4th International Workshop on Semantic Evaluations, pages 24–29, Prague. Disambiguation of Preposition Sense Using Linguistically Motivated Features, Stephen Tratz and Dirk Hovy. Proceedings of the NAACL HLT Student Research Workshop and Doctoral Consortium, pages 96–100, Boulder, Colorado, June c 2009 Association for Computational Linguistics
reading – grammars, etc the NLP dictionary: 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 Writer’s Cookbook. Miriam Butt, Tracy Holloway King, Marma-Eugenia Niño and Fridirique Segond also (for writing larger grammars) it is useful to find a book on grammar for tutors and/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 and Algorithms. Vladimir Fomichov A. 2010
reading – kn rep for NLP logic and knowledge representation – a guide 2324%20PR.pdf representing events for NLP representing%20events%22&source=web&cd=6&sqi=2&ved=0CEgQFjAF&url=h ttp%3A%2F%2Fwww.aaai.org%2Focs%2Findex.php%2FFSS%2FFSS10%2Fpap er%2Fdownload%2F2183%2F2819&ei=f6oWT_e7DeKC4gTMpaijBA&usg=AFQjC NFYmurwJR9oqfCRBimVprWRK45kew&cad=rja semantic networks & frames (2005) VERL: An Ontology Framework for Video Events (2005)