23
LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

  • View
    218

  • Download
    1

Embed Size (px)

Citation preview

Page 1: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

LING 388: Language and Computers

Sandiway Fong

Lecture 1: 8/23

Page 2: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Where– Harvill 208

• When– MW 3:45-5:00PM– Monday September 6th (no class: labor day)– Wednesday September 29th (no class)

• Office Hours– MW 5:00-6:00PM (after class)– Other times by appointment– Location: Douglass 308 (Linguistics)

Page 3: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Map

– Classroom (Harvill)

– Office (Douglass)

Page 4: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Email:– [email protected]

• Homepage:– http://dingo.sbs.arizona.edu/~sandiway

• Lecture powerpoint slides:– available on homepage after each class– in both ppt and Adobe PDF formats– Last year’s slides also available online

• caution: there will be changes from last year

Page 5: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Tips on how to take this class– No required textbook

• save time• suggested readings on request

– Lecture slides contain everything you need to know in order to do the homeworks

• To understand the slides, you need to attend classes to “grok” the concepts

– Unclear on something? • You are encouraged to ask questions in or after class• Ask while the question is still fresh in your mind

– Have an idea, want to go over some of the material again, or have more in-depth questions?

• Office hours

• Make an appointment

Page 6: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Course Objectives– Theoretical

• Introduction to natural language processing techniques

– Practical• Be able to write a natural language grammar that runs on

a computer• Get an idea of what’s hard and what’s easy to do on a

computer

Page 7: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Laboratory Exercises– Some lectures will be laboratory sessions– 50/50 lecture/exercises on the computer in class– Homework questions will be handed out in these

sessions– Homework questions are designed to continue the

lab exercises– You may do the homework exercises on your own

computer or at the computer laboratory

Page 8: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Grading– 4~5 homeworks + 1 final “take-home” exam– Each homework worth about 8-12 points– Homeworks are due 1 week from the date (at midnight) they

are handed out– Homeworks must be submitted by email– Final exam will be worth around 35 points– You may discuss the homeworks with your classmates– However, you must do the work and write them up

independently

Page 9: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Homework tips– Homeworks are based on lab exercises

• make sure you show up for the lab lectures

– Possible time-saving strategy: Stay on after the lecture and do the homework questions right there

• exercises are fresh in your mind

• may even be possible to complete the homework in an hour right there …

– Nightmare strategy: Wait until the evening homework is due, scratch your head over the lecture notes, have tons of questions and start panicking

• your computer crashes, the net goes down …

Page 10: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Late Policy– All homeworks are mandatory– 50% deduction if handed in late– 10% if not handed in when the next homework is out– You must schedule a meeting with me and explain

• Upcoming Emergencies– Must let me know ahead of time or as soon as you can– Explanation needed

Page 11: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Homework Disaster Policy– You “tank” on a homework

• do badly or way worse than you expected• Schedule a meeting

– What are your options?• 1: there are always extra credit questions to bump your score

back up– Chances to demonstrate you really knew the material well

• 2: final exam will re-test you on the areas covered– 2nd chance

– Philosophy• You are not penalized for learning or making an unfortunate

mistake

Page 12: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Administrivia

• Fill out form to be passed out– Name– Email– Year– Major– Why are you interested in computers and

language?– Relevant background

Page 13: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Natural Language ProcessingComputational Linguistics

• Question:– How to process natural languages on a computer

• Intersects with:– Computer science (CS)– Mathematics/Statistics – Artificial intelligence (AI)– Linguistic Theory– Psychology: Psycholinguistics

• e.g. the human sentence processor

Page 14: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Natural Language Properties

• Which ones are going to be difficult for computers to deal with?

• Grammar (Rules for putting words together into sentences)– How many rules are there?

• 100, 1000, 10000, more …

– Portions learnt or innate– Do we have all the rules written down somewhere?

• Lexicon (Dictionary)– How many words do we need to know?

• 1000, 10000, 100000 …

Page 15: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Computers vs. Humans

• Knowledge of language– Computers are way faster than humans

• They kill us at arithmetic and chess

– But human beings are so good at language, we often take our ability for granted

• Processed without conscious thought• Do pretty complex things

Page 16: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Examples

• Knowledge– Which report did you file without reading?– (Parasitic gap sentence)

Page 17: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Examples

• Changes in interpretation• John is too stubborn to talk to• John is too stubborn to talk to Bill

Page 18: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Examples

• Ambiguity– Where can I see the bus stop?

– stop: verb or part of the noun-noun compound bus stop

– Context (Discourse or situation)

Page 19: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Examples

• Ungrammaticality– *Which book did you file the report without

reading?

– * = ungrammatical• relative

– ungrammatical vs. incomprehensible

Page 20: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Example

• The human parser has quirks• Ian told the man that he hired a story• Ian told the man that he hired a secretary

• Garden-pathing• Temporary ambiguity• tell: someone something vs. …

Page 21: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Examples

• More subtle differences• The reporter who the senator attacked admitted the error• The reporter who attacked the senator admitted the error

– Processing time– Subject vs. object relative clauses– Q: Do we want to mimic the human parser

completely?

Page 22: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Topics we will cover

• [From last year’s homepage, there will be changes.]

Page 23: LING 388: Language and Computers Sandiway Fong Lecture 1: 8/23

Next time …

• We will begin by gently introducing you to a programming language you will become familiar with– Two lectures– Name: PROLOG– Variant: SWI-PROLOG (free software)– Download: http://www.swi-prolog.org/– Based on logic– “Natural” and easy to learn but powerful– Contains lots of nifty built-in features for writing grammars

• language was originally designed for this purpose