120 likes | 291 Views
PHRASE STRUCTURE GRAMMARS RTNs ATNs Augmented phrase structure rules / trees. Dependency Grammar Transformational Grammar Phrase Structure Grammar Case Grammar Unification Based Grammar. RTN : Recursive Transition Network Grammar: S -> NP VP Push NP Push VP Pop S/ S/NP S/VP.
E N D
PHRASE STRUCTURE GRAMMARS RTNs ATNs Augmented phrase structure rules / trees
Dependency Grammar • Transformational Grammar • Phrase Structure Grammar • Case Grammar • Unification Based Grammar RTN : Recursive Transition Network Grammar: S -> NP VP Push NP Push VP Pop S/ S/NP S/VP or bottom up: NP VP -> S No conditions on arcs/rules with RTNs; „just“ POS: NP () VP () -> S ()
Dependency Grammar • Transformational Grammar • Phrase Structure Grammar • Case Grammar • Unification Based Grammar RTN : Recursive Transition Network Grammar: NP -> { NP / DET } AP* N Or bottom up: DET (AP) N -> NP No conditions on arcs/rules with RTNs; „just“ POS: AP () NP () -> NP () DET () NP () -> NP () Cat DET Cat N Pop NP/ NP/D NP/N Push NP(Proper)
Dependency Grammar • Transformational Grammar • Phrase Structure Grammar • Case Grammar • Unification Based Grammar ATN : Augmented Transition Network (3) NP -> { NP / DET } AP* N (SETR SPEC (BQ (DET *))) (AGR AP HEAD) (ADDR AP *) (SETR HEAD *) Push AP Cat DET Cat N Pop NP/ NP/D NP/N Push NP (SETR SPEC *) (BQ (NP + + (N +)) SPEC AP HEAD)
Or bottom up: DET (AP) N -> NP But now: conditions/actions on arcs/rules with ATNs; not „just“ POS: AP () NP (NP.AGREE.HEAD(AP)) -> NP (NP=HEAD) NP(*DET, *AP) -> NP (NP=SPEC) (works with proper nouns|names) In PLNLP: NP (Proper) -> NP(%NP) ADJP () NP (HEAD.AGREE.HEAD(ADJP)) -> NP
(0020) VERB() --> VP(%VERB) (0025) ADV() --> ADVP(%ADV) (0030) ADJ(BASE.ISIN.&(A THE)) --> ADJP(%ADJ,SEGTYP2='DET', <BASE(ADJ).ISIN.&(A AN),+INDEF>, <BASE(ADJ).EQ.'THE',+DEF>)
(0100) ADJP() NP(SEGTYP2(ADJP).NE.'DET'|POSS(ADJP)|*INDEF(ADJP) ...) --> NP(%NP,PRMODS=ADJP...PRMODS,....)
Example of ADJP + NP -> NP „fine beer“ (0015) NOUN(BASE.EQ.'BEER') --> NP(%NOUN,+ALCOHOL) (0035) ADJ(BASE.NOTIN.&(A THE)) --> ADJP(%ADJ,SEGTYP2='ADJP') (0100) ADJP() NP(SEGTYP2(ADJP).NE.'DET'|POSS(ADJP)|*INDEF(ADJP)| <SG(ADJP),SG|SETERR<'NUM1'>>) --> NP(%NP,PRMODS=ADJP...PRMODS, ...)
store record selection 'ADJ1' parse selection Text: fine beer Tree: (0100) ADJP4-(0035)ADJ1--'FINE' NP6---NP5---(0015)NOUN2-'BEER' Selected Record: NODENAME ADJ1 " fine" LENGTH 4 DICT 'FINE' BASE 'FINE' SEGTYP2 'ADJ' Result: 'SUCCESS' "" Success --- (next sentence) --- fine beer parse selection Text: fine beer Tree: (0100) ADJP4-(0035)ADJ1--'FINE' NP6---NP5---(0015)NOUN2-'BEER' Selected Record: Result: 'SUCCESS' "" Success --- (next sentence) ---
--- (next sentence) --- store record selection 'NOUN2' parse selection Text: fine beer Tree: (0100) ADJP4-(0035)ADJ1--'FINE' NP6---NP5---(0015)NOUN2-'BEER' Selected Record: NODENAME NOUN2 " beer" LENGTH 4 DICT 'BEER' SG BASE 'BEER' SEGTYP2 'NOUN' Result: 'SUCCESS' "" Success --- (next sentence) --- --- (next sentence) --- store record selection 'NP5' parse selection Text: fine beer Tree: (0100) ADJP4-(0035)ADJ1--'FINE' NP6---NP5---(0015)NOUN2-'BEER' Selected Record: NODENAME NP5 " beer" LENGTH 4 DICT 'BEER' SG BASE 'BEER' HEAD NOUN2 " beer" SEGTYP2 'NP' ALCOHOL URULE (0015) Result: 'SUCCESS' "" Success --- (next sentence) ---
Selected Record: NODENAME NP5 " beer" LENGTH 4 DICT 'BEER' SG BASE 'BEER' HEAD NOUN2 " beer" SEGTYP2 'NP' ALCOHOL URULE (0015) Result: 'SUCCESS' "" Success Selected Record: NODENAME ADJP4 " fine" LENGTH 4 DICT 'FINE' BASE 'FINE' HEAD ADJ1 " fine" SEGTYP2 'ADJP' URULE (0035) Result: 'SUCCESS' "" Success fine beer Selected Record: NODENAME ADJ1 " fine" LENGTH 4 DICT 'FINE' BASE 'FINE' SEGTYP2 'ADJ' Result: 'SUCCESS' "" Success 35 15 Selected Record: NODENAME NOUN2 " beer" LENGTH 4 DICT 'BEER' SG BASE 'BEER' SEGTYP2 'NOUN' Result: 'SUCCESS' "" Success
Text: fine beer Tree: (0100) ADJP4-(0035)ADJ1--'FINE' NP6---NP5---(0015)NOUN2-'BEER' Selected Record: NODENAME NP6 " fine beer" LENGTH 9 DICT 'BEER' SG BASE 'BEER' ALCOHOL URULE (0015) HEAD NP5 " beer" SEGTYP2 'NP' PRMODS ADJP4 " fine" RULE (0100) Result: 'SUCCESS' "" Success --- (next sentence) ---