1 / 16

CSA2050

CSA2050. The PATR Formalism Rule Syntax Lexicon Syntax. PATR Rule Syntax. Rule LHS -> RHS_1 RHS_2 . . .RHS_N LHS (the symbol to the left of the arrow) is a nonterminal symbol for the type of phrase that is being described.

Download Presentation

CSA2050

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. CSA2050 The PATR Formalism Rule Syntax Lexicon Syntax

  2. PATR Rule Syntax Rule LHS -> RHS_1 RHS_2 . . .RHS_N • LHS (the symbol to the left of the arrow) is a nonterminal symbol for the type of phrase that is being described. • RHS_1 RHS_2 . . .RHS_N is a list of categories, i.e. either nonterminal or terminal symbols.

  3. PATR Rule Syntax • Optional constituents (or sets of constituents) are enclosed in parentheses Rule S -> NP VP (SubCl) • Alternative constituents (or sets of constituents) on the right hand side are separated by slashesRule Det -> DT / PR • Braces are used to group alternative sets of elements together, so that alternations are not ambiguousRule AdvP -> {AV / PrepP} (AdvP_1) • Symbols should not be repeated verbatim within a rule. Underscore N (e.g. NP_3) used instead.

  4. Feature Structures • Feature structures are commonly written as attribute-value matrices , e.g. [ lex: telescope cat: N ]

  5. Complex-Valued FS • Feature structures can have either simple values, or complex values, such as this [cat: np head: [agr: [ num: sg gen: masc] deftype: indef]] • Feature structures can be arbitrarily nested in this manner.

  6. Building Up Structure • Agreement Features[ num sing person 3 ] • Noun Phrase[ cat np agr [ num sing person 3 ]] • Sentence[cat s subj [ cat np agr [ num sing person 3 ]]]

  7. Paths • Portions of a feature structure can be referred to using the path notation. • A path is a sequence of one or more feature names enclosed in angled brackets ( <> ). • Checkpoint: identify all the paths in the • previous FS, e.g. <head deftype>

  8. Unification • Unification is the basic operation applied to feature structures in PC-PATR • It consists of the merging of the information from two feature structures. • Two feature structures can unify if their common features have the same values, but do not unify if any feature values conflict.

  9. 1. [ agreement: [ number: singular person: first ] ] 2. [ agreement: [ number: singular case: nominative ] ] 3. [ agreement: [ number: singular person: third ] ] 4.[ agreement: [ number: singular person: first ] case: nominative ] ] 5. [ agreement: [ number: singular person: third ] case: nominative ] ] Simple Unification Examples

  10. Checkpoint Satisfy yourself that, using the previous examples: • unify(1,2) = 4 • unify(2,3) = 5 • unify(1,3) = fail

  11. Constraint Equations • The feature constraints associated with phrase structure rules in PC-PATR consist of a set ofunification expressions. • Each expression has three parts, in this order: • a feature path, the first element of which is one of the symbols from the phrase structure rule • an equal sign (=) • either a simple value, or another feature path that also starts with a symbol from the phrase structure

  12. Execution of Equations • Each equation is interpreted as an instruction to unify the left and right hand sides • First, each side is "evaluated" before any unification is attempted. If the path does not exist it is created. • After successful unification, the two structures are not merely equivalent, but identical, so that any changes to one affect changes to the other.

  13. Lexical Entries • Lexical entries define the basic properties of words. • Each definition divided into fields, each of which begins with a standard format marker at the beginning of a line. • \w the lexical form of the word, • \c word category (part of speech) • \g word gloss • \f additional features of this word

  14. Lexical Entry Examples \w fox \c N \g canine \f <number> = singular \w foxes \c N \g canine+PL \f <number> = plural

  15. Corresponding Feature Structures • When these entries are used by the grammar, they are represented by these feature structures: [ cat: N gloss: canine lex: foxes number: singular ][ cat: N gloss: canine+PL lex: foxes number: plural ]

  16. Grammar (grammar.grm) Rule s -> np vp Rule np -> n Rule vp -> v Lexicon (lexicon.lex) \w uther \c n \w sleeps \c v Example Grammar and Lexicon

More Related