Definite Clause Translation Grammars and their Applications
暂无分享,去创建一个
DCGs, as we have seen, provide a general mechanism for grammatical computation. One could, for example, define a DCG for a subset of a natural language which would analyze sentences, form a derivation tree, check for agreement between subject and verb, translate input sentences into some logical form, and so on. The trouble with such an all-inclusive DCG, however, is that with an increasing number of arguments attached to the nonterminal symbols, the rules become difficult to read and/or modify. In order to change something in the logical form construction, for example, one would have to be very careful to adjust the right argument in each affected nonterminal symbol: one has to make semantic changes within a rule which incorporates in a nonmodular fashion both syntax and semantics. It is all too easy to become confused and make a significant change to the behavior of a grammatical specification. Furthermore, as we have seen in chapter 7, section 3, and in chapter 8, both the parse tree formation, and the formation of semantic structure, are mechanizable, and it is unnecessary to impose on the grammar writer any mechanical task.