Closing remarks
We have now reached the end of the presentation of Definite Clause Grammar (DCG) definitions in this book. When taken together, they provide a system for parsing contemporary English with a wide coverage. However, keeping the phrase structure rules straightforward and restricting the amount of structural ambiguity encountered with results placed limits on the coverage. Here, we note some limitations.
- Phrase heads need to always be present in the word list. Note that representation as a zero head is possible, e.g., w('P-CONN','_*_').
- There is no mechanism to capture extrapositioning, e.g., rightward displacements of relative clauses, that-clauses and to-infinitive clauses.
- There is no support for parentheticals.
- The support for punctuation is limited.
In regard to limitations on punctuation:
- There is no support for punctuation internal to phrase layers.
- Commas have to occur between conjuncts, except between the penultimate and last conjunct which must have a represented conjunction word (CONJ) instead.
- Commas can occur optionally after adverbials with a clause initial placement or before adverbials with a clause final placement when attached at the highest layer of clause structure.
- A full stop or exclamation mark (final punctuation) with a final position is required for a declarative or imperative sentence.
- A question mark (final_question punctuation) with a final position is required for an interrogative sentence.
Some limited coverage of extrapositioning is possible when the extraposed element is a noun phrase, as examples (7.1) and (7.2) illustrate.
- (7.1)
-
| ?- tphrase_set_string([w('NPR','John'), w('VBD',';~Tn','made'), w('PRO','_*_'), w('CONJ','and'), w('NPR','Mary'), w('VBD',';~Tn','ate'), w('PRO','_*_'), w('P-ROLE','_*_'), w('Q','every'), w('N','pizza'), w('PUNC','.')]), parse(sentence).
(IP-MAT (ILYR (ILYR (NP-SBJ (NPR John))
(VBD;~Tn made)
(NP-OB1 (PRO _*_)))
(CONJP (CONJ and)
(ILYR (NP-SBJ (NPR Mary))
(VBD;~Tn ate)
(NP-OB1 (PRO _*_)))))
(PP-NIM (P-ROLE _*_)
(NP (Q every)
(N pizza)))
(PUNC .))
- (7.2)
-
| ?- tphrase_set_string([w('N','Development'), w('P-ROLE','of'), w('PRO','_*_'), w('CONJ','and'), w('N','research'), w('P-ROLE','with'), w('PRO','_*_'), w('P-ROLE','_*_'), w('D','a'), w('ADJ','Parsed'), w('N','Corpus')]), parse(noun_phrase('',non_privileged)).
(NP (NLYR (NP (N Development)
(PP (P-ROLE of)
(NP (PRO _*_))))
(CONJP (CONJ and)
(NP (N research)
(PP (P-ROLE with)
(NP (PRO _*_))))))
(PP (P-ROLE _*_)
(NP (D a)
(ADJP (ADJ Parsed))
(N Corpus))))