Feature Organization

References: Constituent Structure

Pd Features

Pd features (see constituent structure) require special handling. positionFeature/2 in Nmacros declares the publically accessible Pd features:
positionalFeature(apos,X,hfApos(X)).
positionalFeature(adjunct,X,posInfoAdjunct(X)).
positionalFeature(compl,X,posInfoCompl(X)).
positionalFeature(indirectObject,X,posInfoIDO(X)).

At compile time, Nmacros looks for goals of the form:

X has_feature P

where P is a positional feature to be rewritten by translateNR/5:

translateNR(has_feature,2,has_feature(X,F),PosGoal,[]) :-
	nonvar(F),
	positionalFeature(F,X,PosGoal),
	!.

For example:

X has_feature apos hfApos(X)
X has_feature indirectObject posInfoIDO(X)

References: Constituent Structure