1 / 11

LING/C SC/PSYC 438/538

LING/C SC/PSYC 438/538. Lecture 25 Sandiway Fong. Administrivia. Homework 4 Extension due Thursday night Reading JM Chapter 12, also 13. Administrivia. 538 presentations We can’t cover as many topics as we’d like in an introductory class of this sort but I ’d like you to explore more

alesia
Download Presentation

LING/C SC/PSYC 438/538

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. LING/C SC/PSYC 438/538 Lecture 25 Sandiway Fong

  2. Administrivia • Homework 4 Extension • due Thursday night • Reading • JM Chapter 12, also 13

  3. Administrivia • 538 presentations • We can’t cover as many topics as we’d like in an introductory class of this sort • but I’d like you to explore more • Select a topic from a chapter (or part of a chapter from the textbook) • Range: chapter 14 through 25 • you can’t pick the same thing as your classmate • First come, first served • Email me your 1st, 2nd and 3rd choices • Present the selected chapter (or part thereof) in class at the end of the semester • produce slides • you’ll be evaluated on the quality of the presentation • how well you communicate the essential ideas/algorithms employed • your understanding of the tradeoffs and limitations etc. • Scheduling • Topic selection: begins now • Time limit: 8 minutes + 2 for questions

  4. FSA Regular Expressions Regular Grammars Recall: Chomsky Hierarchy Diagram from lecture 11 Type-1 = Context-sensitive Type-3 Type-2 = Context-free DCG = Type-0

  5. Definite Clause Grammars • Basic Technology already covered earlier in the course • Review lectures 11—14 • Next homework • Will be on writing a fragment of a grammar

  6. Context-free Definite Clause Grammars • Basically (in DCG format): • LHS --> RHS. • LHS = single non-terminal (context-free restriction) • RHS = a sequence of zero or more terminal or non-terminals (possibly mixed) • cf. the limited possibilities on the RHS for regular grammars • In DCGs • non-terminals may contain extra arguments e.g. np np(NP,Case,Number,Person) • these extra arguments can be to enforce constraints, e.g. agreement, or simply return desired values, e.g. fragment of a parse tree • mechanism can be used to implement grammars more general than type-2

  7. Examples • Type-3 (Regular) • a+b+ • Type-2 (Context-free) not in Type-3 • {anbn|n≥1} • Type-1 (Context-sensitive) not in Type-2 • {anbncn|n≥1}

  8. Review Exercise 1 • Write a definite clause grammar for • {anbncn|n≥1} See Prolog grammar file abc.pl

  9. Review Exercise 2 • Let’s write a context-free grammar that returns parse trees for simple active/passive sentence pairs such as: • John hit a ball/John ate a sandwich • *John hit/John ate • *hit a ball/*ate a sandwich • the ball was hit/the sandwich was eaten • the ball was hit by John/the sandwich was eaten by John • Let’s introduce traces in the case of passives: • [S [NP the ball] [VP [aux was ][VP [V hit] [NPtrace]]]] • [S [NP the ball] [VP [VP [aux was ][VP [V hit] [NPtrace]]][PP [Pby][NP John]]]]

  10. Review Exercise 2 • Note: • need to handle English passive morphology • passive be selects for a V-en Example *was ate (simple past form) was eaten (-en past participle form) • Implementation: • use an extra argument to indicate the verb form • e.g. v(v(ate),past) --> [ate]. v(v(eaten),pastparticiple) --> [eaten].

  11. Review Exercise 2 • Note: • English progressives can be handled along the same lines • e.g. John was eat-ing a sandwich See grammar file english.pl

More Related