1 / 16

02/23/98 Natural Language Processing

Explore the fascinating field of Natural Language Processing (NLP) and its applications in understanding and processing human language. This article discusses the challenges, tasks, and ways to make language processing more efficient.

estepr
Download Presentation

02/23/98 Natural Language Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. 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. 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. 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) Top down processing We are here Bottom up processing

  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. 1 2 3 4 5 Our Limited Problem • 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. 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. 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. Sample Sentences: Ungrammatical • Break the pyramid. • Lift a blocks. • Pick up block. • Pick up the green blue pyramid cube. • Move.

  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. 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. Lexicon for the Example

  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: Actually these are lexicon entries like on the previous slide 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 Verbbreaks Verbrecycles Verb“Picks up” Advquickly Advcarefully

  14. Top-down and bottom-up rewrites S NP VP NP ADJS Noun VP NP Noun VP NP Fred VP NP Fred Adverb Verb NP Fred carefully Verb NP Fred carefullyrecyclesNP Fred carefullyrecyclesDet ADJS Noun Fred carefullyrecyclesthe ADJS Noun Fred carefullyrecyclesthe Adj ADJS Noun Fred carefullyrecyclestheheavy ADJS Noun Fred carefullyrecyclestheheavy Adj ADJS Noun Fred carefullyrecyclestheheavyred ADJS Noun Fred carefullyrecyclestheheavyred Noun Fred carefullyrecyclestheheavyredrock Fred carefullyrecyclestheheavyredrock 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 S NP VP NP NP  ADJS Noun NP  Det ADJS Noun ADJS  ADJS  Adj ADJS VP  Verb VP  Adv Verb To parse: Fred carefullyrecyclestheheavyredrock

  15. The Parse Tree • Fred carefully recycles the heavy red rock. S NP VP NP ADJS Noun Adverb Verb Det ADJS Noun the Fred carefully recycles rock Adj ADJS heavy Adj ADJS red

  16. Grammar for the Example (first cut)

More Related