:- op(700,xfx,@).
:- op(1150, xfx, '--->').

% sr_parse([astronomers,saw,stars,with,ears],s(Tree@Prob)).

s(s(NP,VP)@1*(PNP*PVP)) --->
	np(NP@PNP),
	vp(VP@PVP).

pp(pp(P,NP)@1*(PP*PNP)) --->
	p(P@PP),
	np(NP@PNP).
vp(vp(V,NP)@0.7*(PV*PNP)) --->
	v(V@PV),
	np(NP@PNP).
vp(vp(VP,PP)@0.3*(PVP*PPP)) --->
	vp(VP@PVP),
	pp(PP@PPP).

np(np(NP,PP)@0.4*(PNP*PPP)) --->
	np(NP@PNP),
	pp(PP@PPP).


p(p(with)@1) ---> [with].

v(v(saw)@1) ---> [saw].


np(np(astronomers)@0.1) ---> [astronomers].
np(np(ears)@0.18) ---> [ears].
np(np(saw)@0.04) ---> [saw].
np(np(stars)@0.18) ---> [stars].
np(np(telescopes)@0.1) ---> [telescopes].
