the components of a trale grammar implementing hpsg
play

The components of a Trale grammar Implementing HPSG grammars - PowerPoint PPT Presentation

The components of a Trale grammar Implementing HPSG grammars Signature The TRALE system Descriptions Kordula De Kuthy Phrase Structure Constraint-based grammar implementation, SoSe 2010 Implicational Constraints A second look


  1. The components of a Trale grammar Implementing HPSG grammars • Signature The TRALE system • Descriptions Kordula De Kuthy • Phrase Structure Constraint-based grammar implementation, SoSe 2010 • Implicational Constraints • A second look at descriptions: abbreviations • Relations (called using relational or functional notation) • Lexical Rules 1 2 Signature: declaring the basic vocabulary Signature: Example The signature declares the basic set of type and feature names for use in type_hierarchy descriptions. bot sign These names must start with a lower case letter and continue with a-z , phrase dtr:list A-Z , 0-9 , or . word cat:cat cat noun verb list ne_list hd:bot tl:list e_list . 3 4

  2. Signature: Example with multiple inheritance Descriptions type_hierarchy bot A description consists of sign phrase dtrs:list • a type specification: word starting with lower letters word cat:cat cat • a structure sharing: word starting with a capital letter nounish noun gerund • a compound description: path : description verbish with path consisting of feature or feature : path verb &gerund list ne_list hd:bot tl:list e_list . 5 6 Phrase Structure (I) Implicational Constraints HFP as specified in Pollard & Sag (1994) % I. Lexicon john ---> (word,phon:[(a_ john)],cat:noun). » phrase – » synsem | loc | cat | head – left ---> (word,phon:[(a_ left)],cat:verb). 1 → dtrs | head-dtr | synsem | loc | cat | head 1 dtrs headed-structure % II. Phrase Structure Rule: subj_head_rule rule can be specified in Trale as: (phrase,phon:[SubjPhon,HeadPhon],dtrs:[Subj,Head]) ===> cat> (Subj,word,phon:[SubjPhon],cat:noun), (phrase, dtrs:headed_structure) *> cat> (Head,word,phon:[HeadPhon],cat:verb). (synsem:loc:cat:head:H, dtrs:head_dtr:synsem:loc:cat:head:H). 7 8

  3. A second look at descriptions Another look at descriptions Example from HPSG: Abbreviation used in Pollard & Sag (1994) Realization in Trale using logical variable macros Definition: Abbreviation Abbreviated AVM 2 3 synsem np(Index-index):= (local:(category:(head:noun, 2 3 » head – noun 6 7 NP 1 6 4 category 7 subcat:[]) subcat �� 6 6 7 7 local 4 5 5 content:index:Index)). content | index 1 vp(Cont-cont):= (local:(category:(head:verb, 2 3 synsem subcat:[synsem]) 2 3 " head # verb 6 7 VP: 1 6 7 content:Cont)). category D E 6 6 7 7 synsem local subcat 6 6 7 7 4 5 4 5 content 1 Use: john ---> (word,phon:[(a_ john)], synsem: @np((per:third,num:sing))). left ---> (word,phon:[(a_ left)], synsem: (@vp((leave-rel,leaver:Index)), local:category:subcat:hd:@np(Index))). 9 10 Expressing relational dependencies Functional notation for relations on lexical entries, phrase structure rules or implicational constraints Example from HPSG: The Subcat Principle Definition: 2 3 synsem | loc | cat | subcat 1 append([],ne_list,L) if true. “ ” 2 3 6 7 h i 4 head-dtr | synsem | loc | cat | subcat append 1 , 2 dtrs headed-structure 6 7 → append([H|T1],L,[H|T2]) if append(T1,L,T2). 6 7 dtrs “ ” 5 4 5 comp-dtrs synsem2sign 2 synsem2sign(e_list,e_list) if true. with the relations append/3 and synsem2sign/2 defined as follows synsem2sign([H|T],[synsem:H|NewT]) if synsem2sign(T,NewT). “ ” := append �� , 1 1 . Use: “ D E ” D “ ” E := 1 | 2 1 | append append , 3 2 , 3 . phrase *> (synsem:category:subcat:PhrSubcat, dtrs: (head_dtr:synsem:category:subcat:HeadSubcat, “ ” := comp_dtrs:CompDtrs) synsem2sign �� �� . goal “ D E ” D h i “ ” E := 1 | 2 | synsem2sign synsem2sign synsem 1 2 . synsem2sign(CompSynsems,CompDtrs), append(CompSynsems,PhrSubcat,HeadSubcat). 11 12

  4. Functional notation for relations Lexical rules A Trale encoding of the Subcat Principle psp_lex_rule ## (dtrs:headed-structure) *> (synsem:loc:(cat:head:(vform:base, (synsem:loc:cat:subcat:MotherSubcat, aux:Aux), dtrs: (head_dtr:synsem:loc:cat:subcat: cont:Cont)) append(MotherSubcat,CompSynsems) **> comp_dtrs: synsem2sign(CompSynsems))) (synsem:loc:(cat:head:(vform:psp, aux:Aux), fun append(+,+,-). cont:(perfect_rel, append([],ne_list,L) if true. soa_arg:Cont))) append([H|T1],L,[H|T2]) if morphs append(T1,L,T2). be becomes been, give becomes given, fun synsem2sign(+,-). (X,[e]) becomes (X,ed), synsem2sign(e_list,e_list) if true. X becomes (X,ed). synsem2sign([H|T],[synsem:H|synsem2sign(T)]) if true. 13 14 References Pollard, C. & I. A. Sag (1994). Head-Driven Phrase Structure Grammar . Chicago, IL: University of Chicago Press. 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend