I’m using: swish
What is the most elegant way to generate a DCG from a compound term representing a parse tree?
For example, from this compound term:
s(np(det(le), noun(chat)), vp(v(mange), np(det(une), noun(souris))))
I would like to assert the following DCG clauses:
s --> np,vp np --> det, noun vp --> v,np v --> [mange] det --> [le] det --> [une] noun --> [chat] noun --> [souris]