Language Generation
The same DCG can be used for parsing and
generation
l Parsing:
l Given: S(sem, [John, loves, Mary])
l Return: sem = Loves(John, Mary)
l Generation:
l Given: S(Loves(John, Mary), words)
l Return: words = [John, loves, Mary]