Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE573 Autumn 1997 1 02/23/98 Natural Language Processing Administrative –PS3 due today –PS4 out Wednesday, due Friday 3/13 (last day of class) special.

Similar presentations


Presentation on theme: "CSE573 Autumn 1997 1 02/23/98 Natural Language Processing Administrative –PS3 due today –PS4 out Wednesday, due Friday 3/13 (last day of class) special."— Presentation transcript:

1 CSE573 Autumn 1997 1 02/23/98 Natural Language Processing Administrative –PS3 due today –PS4 out Wednesday, due Friday 3/13 (last day of class) special end-of-quarter offer: turn in at the final costs 2 late days! Last time –the Graphplan algorithm This time –Graphplan –Natural language processing

2 CSE573 Autumn 1997 2 NLP Perspective An interesting cognitive problem –language is the most “human” communication modality, so it seems impossible to understand human intelligence without understanding how language works –Turing test looked on ability to communicate in an unrestricted natural language dialogue as the definition of intelligence An interesting practical problem: incredible extensions to usefulness of computers if problems could be solved in –speech recognition and understanding (no more phone menus!) –handwriting recognition and understanding (a PDA that actually works) –machine translation (electronic funds transfers and more complex multi- national transactions) –text recognition (intelligent information retrieval)

3 CSE573 Autumn 1997 3 The main problem The problem is not so well defined: take {spoken/written/textual} language as input, and... Understanding language is “AI Complete” –in order to do it you have to understand every other facet of intelligence as well --- planning, reasoning about physical systems, geometrical and spatial reasoning, diagnosis, etc. etc. The history of natural language processing in AI is a process of discovering just how difficult and deep the problem is Ways to make the problem easier –work in limited domains (newspaper stories about earthquakes) –work with simpler syntax (will respond to information requests or to simple commands but cannot understand arbitrary sentences about the domain). Example: electronic funds transfers; intelligent database front-ends; Truckworld scenarios

4 CSE573 Autumn 1997 4 The usual breakdown of language processing tasks Signal understanding: translate signals (spoken speech or written characters) into some internal symbolic form. Produce phonemes or characters. Phonology: group phonemes into morphemes Morphology: group morphemes into words Syntax: parse words into phrases, phrases into sentences Semantics: connect words to objects and concepts in some internal representation language Pragmatics: infer what is desired from what is said in a sentence Discourse: constructing an argument, negotiating an agreement, (communication among agents) We are here Bottom up processing Top down processing

5 CSE573 Autumn 1997 5 Our Main Task: A Command Processor The system will parse, interpret and execute commands in a simple world –Blocks world (in class): “Pick up the green sphere on top of the yellow cube” “Put it down next to the red cube.” –Truckworld (for the problem set): “Recycle the red broken glass.” “Refuel using the fuel drum at position 7.” Parsing: is the sentence well formed? Semantic Interpretation: –does the command make sense given the current state of the world? –what do the pronouns refer to? Execution: simple call to an execution system (Macrops)

6 CSE573 Autumn 1997 6 Our Limited Problem 12345 Arm can lift at most one object at a time Pyramid can be put on top of another block but not below Sphere cannot be put on top or below any block Actions pick up top block at current position put down block being held move the gripper to another position

7 CSE573 Autumn 1997 7 Goal of the exercise Parse commands, flagging those that are grammatically incorrect Verify that the command is legal –does a pickup sentence refer to a single object –is the gripper at the same location as that object –is the object at the top of the stack –is the gripper empty If so, “execute it”

8 CSE573 Autumn 1997 8 Sample Sentences: Grammatical and Feasible Pick up the blue pyramid. Pick up a green block. Pick up a cube. Lift the block at position 5. Move to position 3. Move to a cube. Put it down. Drop the red cube. Put down a block. (Feasible under the proper circumstances)

9 CSE573 Autumn 1997 9 Sample Sentences: Ungrammatical Break the pyramid. Lift a blocks. Pick up block. Pick up the green blue pyramid cube. Move.

10 CSE573 Autumn 1997 10 Sample Sentences: Grammatical but Infeasible Pick up the cubes. Move to position 8. Pick up the cube; Move to 3; Pick up the green sphere Pick up the green sphere; Move to 2; Put it down. Pick up a cube; Move to the pyramid; Put down the cube. Pick up the cube. Pick up a red sphere.

11 CSE573 Autumn 1997 11 Morphology (the Lexicon) The Lexicon (dictionary) is a list of all recognizable words Naive approach, just list them Redundancy problem –inconsequentially is probably best stored as a variant of the root word consequent, along with a note that it was negated, and the fact that it is an adverb Additional information required –part of speech (rock is both a noun and a verb) –singular or plural (nouns) –tense (verb) –can the verb take an object? (hit versus cried) Some typical lexicon entries –(glasses (n (agr p) (root glass)) –(detonate (v (tense present) (object t))) –(explode (v (tense present) (object t) (root detonate)))

12 CSE573 Autumn 1997 12 Lexicon for the Example

13 CSE573 Autumn 1997 13 Parsing The task: –take as input a sentence (list of symbols/words) and a grammar –produce as output whether or not the sentence is grammatical? a parse tree? Grammar as rewrite rules: S  NP VP NP NP  ADJS Noun NP  Det ADJS Noun ADJS  ADJS  Adj ADJS VP  Verb VP  Adverb Verb Det  a Det  an Det  the Noun  rock Noun  glass Noun  glasses Noun  Fred Adj  heavy Adj  broken Adj  red Actually these are lexicon entries like on the previous slide Verb  breaks Verb  recycles Verb  “Picks up” Adv  quickly Adv  carefully

14 CSE573 Autumn 1997 14 Top-down and bottom-up rewrites S  NP VP NP NP  ADJS Noun NP  Det ADJS Noun ADJS  ADJS  Adj ADJS VP  Verb VP  Adv Verb S  NP VP NP  ADJS Noun VP NP  Noun VP NP  Fred VP NP  Fred Adverb Verb NP  Fred carefully Verb NP  Fred carefully recycles NP  Fred carefully recycles Det ADJS Noun  Fred carefully recycles the ADJS Noun  Fred carefully recycles the Adj ADJS Noun  Fred carefully recycles the heavy ADJS Noun  Fred carefully recycles the heavy Adj ADJS Noun  Fred carefully recycles the heavy red ADJS Noun  Fred carefully recycles the heavy red Noun  Fred carefully recycles the heavy red rock Fred carefully recycles the heavy red rock Noun Adv Verb Det Adj Adj Noun ADJS Noun Adv Verb Det Adj Adj Noun NP Adv Verb Det Adj Adj Noun NP VP Det Adj Adj ADJS Noun NP VP Det Adj ADJS Noun NP VP Det ADJS Noun NP VP NP S To parse: Fred carefully recycles the heavy red rock

15 CSE573 Autumn 1997 15 The Parse Tree l Fred carefully recycles the heavy red rock. S NPVPNP NounADJSAdverbVerbDetADJSNoun ADJSAdj ADJSAdj Fredcarefullyrecycles the heavy red rock

16 CSE573 Autumn 1997 16 Grammar for the Example (first cut)


Download ppt "CSE573 Autumn 1997 1 02/23/98 Natural Language Processing Administrative –PS3 due today –PS4 out Wednesday, due Friday 3/13 (last day of class) special."

Similar presentations


Ads by Google