|start | find | index | login or register | edit|
by earl, 6327 days agoDefinite Clause Grammar
Basically, DCGs are an intuitive notation for CFGs in Prolog. A CFG (being a formal language) can directly and validly be transformed into a DCG (being a formal language). Once DCGs are consulted (loaded) by a Prolog implementation, they will be immediatly translated into Prolog clauses.
"DCG notation is a natural notation that lets us write context free grammars in a natural way. DCGs translate into a difference list representation that allows far more efficient processing than a naive single-list representation [...]"
Further, the relationship between DCGs and their corresponding Prolog rules allows for a natural notation of syntactic features. Features are an approach to grammar description facilitating multiple classification / sub-categorization in a clean way.
4 active users
|earl.strain.at • esa3 • online for 7023 days • c'est un vanilla site|