Notes on computational linguistics.pdf - UCLA Department of ...
Notes on computational linguistics.pdf - UCLA Department of ...
Notes on computational linguistics.pdf - UCLA Department of ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Stabler - Lx 185/209 2003<br />
children(Parent, Children) :- subtree(Parent, _/Trees), children(Trees, 1, Parent, Children).<br />
children([], _, _, []).<br />
children([Tree|Trees], I, Parent, [n(I,Tree,Parent)|Children]) :- I =< 3, I1 is I+1, children(Trees, I1, Parent, Children).<br />
% siblings(Node, Siblings) is true iff Siblings is a list <strong>of</strong> siblings<br />
% <strong>of</strong> Node. The versi<strong>on</strong> presented here <strong>on</strong>ly works with unary and<br />
% binary branching nodes.<br />
siblings(Node, []) :- root(Node). % Node has no siblings if Node is root<br />
siblings(Node, []) :- children(_, [Node]). % Node has no siblings if it’s an <strong>on</strong>ly child<br />
siblings(Node, [Sibling]) :- children(_, [Node, Sibling]).<br />
siblings(Node, [Sibling]) :- children(_, [Sibling, Node]).<br />
5.2 Categories and features<br />
(8) With these noti<strong>on</strong>s, we can set the stage for computing standard manipulati<strong>on</strong>s <strong>of</strong> trees, labeled with<br />
X-bar style categories:<br />
x(Category,Barlevel,Features,Segment)<br />
where Category is <strong>on</strong>e <strong>of</strong> {n,v,a,p,…}, Barlevel is <strong>on</strong>e <strong>of</strong> {0,1,2}, Features is a list <strong>of</strong> feature<br />
values, each <strong>of</strong> which has the form Attribute:Value, and Segment is - if the c<strong>on</strong>stituent is not a<br />
proper segment <strong>of</strong> an adjuncti<strong>on</strong> structure, and is + otherwise.<br />
So with these c<strong>on</strong>venti<strong>on</strong>s, we will write x(d,2,[],-)/ -hamlet instead <strong>of</strong> dp/[hamlet/[]].<br />
(9) The following definiti<strong>on</strong>s are trivial:<br />
category(Node, Category) :- label(Node, x(Category,_,_,_)).<br />
barlevel(Node, BarLevel) :- label(Node, x(_,BarLevel,_,_)).<br />
features(Node, Features) :- label(Node, x(_,_,Features,_)).<br />
extended(Node, EP) :- label(Node, x(_,_,_,EP)).<br />
no_features(Node) :- features(Node, []).<br />
(10) There are at least two ways <strong>of</strong> c<strong>on</strong>ceptualizing features and feature assignment processes.<br />
First, we can treat features as marks <strong>on</strong> nodes, and distinguish a node without a certain feature from<br />
nodes with this feature (even if the feature’s value is unspecified). This is the approach we take in this<br />
chapter. As we pointed out above, under this approach it is not always clear what it means for two<br />
nodes to “share” a feature, especially in circumstances where the feature is not yet specified <strong>on</strong> either<br />
<strong>of</strong> the nodes. For example, a node moved by Move-α and its trace may share the case feature (so that<br />
the trace “inherits” the case assigned to its antecedent), but if the node does not have a specified case<br />
feature before movement it is not clear what should be shared.<br />
Another approach, more similar to standard treatments <strong>of</strong> features in computati<strong>on</strong>al <strong>linguistics</strong>, is to<br />
associate a single set <strong>of</strong> features with all corresp<strong>on</strong>ding nodes at all levels <strong>of</strong> representati<strong>on</strong>s. For<br />
example, a DP will have a case feature at D-structure, even if it is <strong>on</strong>ly “assigned” case at S-structure or<br />
LF. Under this approach it is straightforward to formalize feature-sharing, but because feature values<br />
are not assigned but <strong>on</strong>ly tested, it can be difficult to formalize requirements that a feature be “assigned”<br />
exactly <strong>on</strong>ce. We can require that a feature value is assigned at most <strong>on</strong>ce by associating each assigner<br />
with a unique identifier and recording the assigner with each feature value. 20 Surprisingly, it is an<br />
open problem in this approach how best to formalize the linguist’s intuiti<strong>on</strong>s that a certain feature<br />
value value must be set somewhere in the derivati<strong>on</strong>. If feature values are freely assigned and can be<br />
checked more than <strong>on</strong>ce, it is not even clear in a unificati<strong>on</strong> grammar what it means to require that a<br />
feature is “assigned” at least <strong>on</strong>ce. 21 The intuitive idea <strong>of</strong> feature-checking is more naturally treated in<br />
a resource-logical or formal language framework, as discussed in §9.<br />
(11) To test a feature value, we define a 3-place predicate:<br />
20The problem <strong>of</strong> requiring uniqueness <strong>of</strong> feature assignment has been discussed in various different places in the literature. Kaplan<br />
and Bresnan (1982) discuss the use <strong>of</strong> unique identifiers to ensure that no grammatical functi<strong>on</strong> is filled more than <strong>on</strong>ce. Stowell<br />
(1981) achieves a similar effect by requiring unique indices in co-indexati<strong>on</strong>. Not all linguists assume that case is uniquely assigned;<br />
for example Chomsky and Lasnik (1993) and many more recent studies assume that a chain can receive case more than <strong>on</strong>ce.<br />
21In work <strong>on</strong> feature structures, this problem is called the ANY value problem, and as far as I know it has no completely satisfactory<br />
soluti<strong>on</strong>. See, e.g. Johns<strong>on</strong> (1988) for discussi<strong>on</strong>.<br />
64