Phrase structure rules

Phrase structure rules for use with LFG for example, can be created by defining the new commands given below, as originally given in an introduction to LaTeX for computational linguistics students.


%% LFG
newcommand{symb}[2]{%
begin{tabular}{c}
normalsize{#1}\
footnotesize{#2}
end{tabular}}
% Optional rule support
newcommand{opt}[1]{ensuremath{left(#1right)}}
% Macros
newcommand{rarr}{ensuremath{rightarrow}}
newcommand{uarr}{ensuremath{uparrow}}
newcommand{darr}{ensuremath{downarrow}}
newcommand{blank}{ensuremath{quad}}

You can use these commands as given in the following example to obtain the illustrated LFG rule, which is a screenshot from the original page.

LFG rule: VP --> V (NP)

LFG rule


symb{VP}{} blank
symb{to}{} blank
symb{V}{ua=da} blank
opt{symb{NP}{(ua OBJ)=da}}

I’ve only used them for LFG, but I’m sure you could use them without the arrows and whatnot to get the functionality to replace that in covington, once you stop using that. The mark-up might look like a nightmare at first, but it’s not really any worse than similar LaTeX stuff.

Advertisements
Leave a comment

What do you have to say about this?

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: