s(s(NP, VP)) --> np(NP), vp(VP). np(np(Det, N)) --> det(Det), n(N). vp(vp(V)) --> v(V). vp(vp(V, NP)) --> v(V), np(NP). det(det(the)) --> [the]. det(det(a)) --> [a]. n(n(dog)) --> [dog]. n(n(cat)) --> [cat]. v(v(barked)) --> [barked]. v(v(chased)) --> [chased]. test1(Tree):-s(Tree, [the, dog, barked], []). test2(Tree):-s(Tree, [the, dog, chased, a, cat], []).

AltStyle によって変換されたページ (->オリジナル) /