20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stabler - Lx 185/209 2003<br />

5.3.2 Adjuncti<strong>on</strong><br />

(23) Like substituti<strong>on</strong>, adjuncti<strong>on</strong> basically involves two replacements, but adjuncti<strong>on</strong> is, unfortunately,<br />

quite a bit more complex. The main reas<strong>on</strong> is that we can have adjuncti<strong>on</strong>s like the <strong>on</strong>es shown in 14c,<br />

where a node is extracted and adjoined to an ancestor. That means that <strong>on</strong>e replacement is d<strong>on</strong>e inside<br />

<strong>on</strong>e <strong>of</strong> the c<strong>on</strong>stituents affected by the other replacement. A sec<strong>on</strong>d factor that slightly increases the<br />

complexity <strong>of</strong> the relati<strong>on</strong> is that a new adjuncti<strong>on</strong> structure is built. It is no surprise, then, that the<br />

specifically linguistic restricti<strong>on</strong>s <strong>on</strong> this operati<strong>on</strong> are also slightly different from those <strong>on</strong> substituti<strong>on</strong>.<br />

(24) We define the relati<strong>on</strong> adjuncti<strong>on</strong> in terms <strong>of</strong> the replacement relati<strong>on</strong> adjoin_node. The latter relati<strong>on</strong><br />

is similar to twice_replace_node, but builds appropriate adjuncti<strong>on</strong> structures. These adjuncti<strong>on</strong><br />

structures are defined slightly differently for the two basic situati<strong>on</strong>s: the more complex case in which<br />

<strong>on</strong>e <strong>of</strong> the changes is inside a moved c<strong>on</strong>stituent, and the simpler case in which the two affected nodes<br />

are distinct. The other relati<strong>on</strong>s just define the relevant requirements <strong>on</strong> the nodes involved.<br />

(25) So,tobeginwith,wedefine:<br />

adjuncti<strong>on</strong>(OldRoot, NewRoot, Adjunct, Trace) :root(OldRoot),<br />

root(NewRoot),<br />

adjunct(OldNode, Adjunct),<br />

trace(Adjunct, Trace),<br />

adjuncti<strong>on</strong>_structure(AdjnctSite, Adjunct, _Segment, Adjuncti<strong>on</strong>),<br />

adjoin_node(OldRoot, OldNode, AdjnctSite, NewRoot, Trace, Adjuncti<strong>on</strong>),<br />

n<strong>on</strong>argument(AdjnctSite),<br />

copy_phi_features(OldNode, Trace0),<br />

add_feature(Trace0, index, I, Trace),<br />

copy_psi_features(OldNode, Adjunct0),<br />

add_feature(Adjunct0, index, I, Adjunct).<br />

(26) The Adjunct part <strong>of</strong> the adjuncti<strong>on</strong> structure will be similartotheoriginalnodetobemoved,OldNode,<br />

as follows:<br />

adjunct(OldNode, Adjunct) :category(OldNode,<br />

Category), category(Adjunct, Category),<br />

barlevel(OldNode, Bar), barlevel(Adjunct, Bar),<br />

extended(OldNode, EP), extended(Adjunct, EP),<br />

c<strong>on</strong>tents(OldNode, C<strong>on</strong>tents), c<strong>on</strong>tents(Adjunct,C<strong>on</strong>tents).<br />

(27) Now we turn to the basic replacement operati<strong>on</strong>s. For substituti<strong>on</strong>, these were trivial, but adjuncti<strong>on</strong><br />

requires a more careful treatment. In the following definiti<strong>on</strong>, the first clause is essentially identical<br />

to the definiti<strong>on</strong> <strong>of</strong> twice_replace_node, but here we must add the sec<strong>on</strong>d clause to cover the case<br />

where A is replaced by DB2 after replacing DA1 by DB1 in a segment <strong>of</strong> DB2:<br />

adjoin_node(A, DA1, DA2, B, DB1, DB2) :label(A,<br />

Label),<br />

label(B, Label),<br />

children(A, ChildrenA),<br />

children(B, ChildrenB),<br />

adjoin_nodes(ChildrenA, DA1, DA2, ChildrenB, DB1, DB2).<br />

adjoin_node(A, DA1, A, B, DB1, B) :adjuncti<strong>on</strong>_structure(A,<br />

_Adjunct, Segment, B),<br />

lower_segment(A,LowerA),<br />

replace_node(LowerA, DA1, Segment, DB1).<br />

lower_segment(A,LowerA) :category(A,Cat),<br />

category(LowerA,Cat),<br />

barlevel(A,Bar), barlevel(LowerA,Bar),<br />

features(A,F), features(LowerA,F),<br />

c<strong>on</strong>tents(A,C<strong>on</strong>tents), c<strong>on</strong>tents(LowerA,C<strong>on</strong>tents),<br />

same_pedigrees(A,LowerA).<br />

Notice that the features and the extended feature <strong>of</strong> A are not copied to LowerA: this just allows LowerA<br />

to match the lower segment <strong>of</strong> the adjuncti<strong>on</strong> structure.<br />

(28) Adjuncti<strong>on</strong> <strong>of</strong> <strong>on</strong>e node to another <strong>on</strong> a distinct branch <strong>of</strong> the tree is slightly less awkward to handle.<br />

Notice how similar the following definiti<strong>on</strong> is to the definiti<strong>on</strong> <strong>of</strong> twice_replace_nodes:<br />

adjoin_nodes([A|As], DA1, DA2, [B|Bs], DB1, DB2) :replace_node(A,<br />

DA1, B, DB1),<br />

replace_nodes(As, DA2, Bs, DB2),<br />

adjuncti<strong>on</strong>_structure(DA2, _Adjunct, Segment, DB2),<br />

features(DA2, Features), features(Segment, Features),<br />

c<strong>on</strong>tents(DA2, C<strong>on</strong>tents), c<strong>on</strong>tents(Segment, C<strong>on</strong>tents).<br />

71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!