ELI5: Explain Like I'm 5

Definite clause grammar

Definite Clause Grammar (DCG) is a way for computers to understand sentences. It helps computers understand the meaning of a sentence and decide what action to take. To use DCG, you have to write special rules (clauses) that describe a sentence. Each rule has a part that describes the form of the sentence and a part that describes what action to take. For example, one rule might say "If a sentence contains the word 'jump', have the computer jump". DCG makes it easier for computers to understand and process sentences.