Talk:Definite clause grammar

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Alternate meanings of DCG[edit]

I want to add a page about "Discounted Cumulative Gain", a popular measure for evaluating Web search and related applications, related to information retrieval in computer science.

I would like to make the current DCG page a disambiguation page. Please advise. —Preceding unsigned comment added by Drmadskills (talkcontribs) 17:56, 30 September 2008 (UTC)[reply]

Push Back[edit]

I guess there is no mention of push back in this article. Push back is found in many Prolog systems DCG implementations. It has the following syntax:

  NT, PH_1 --> PH_2

The meaning is that after parsing the phrase PH_2, the phrase PH_2 is pushed back on the difference list. This allos for checking termimals without consuming them.

For example:

  starts_with_digit, [X] --> [X], {digit(X)}.

Janburse (talk) 10:08, 26 November 2011 (UTC)[reply]

Negation[edit]

The article does also not mention negation in DCG or conditionals in DCG. Many Prolog system DCG implementations nowadays provide these constructs.

Nagation has the following translation:

  p --> \+ q.

Is translated to:

  p(X,Y) :- \+ q(X,_), X=Y.

So again the difference list is not consumed. But this time a condition is evaluated, and when it fails parsing proceeds.

Janburse (talk) 10:08, 26 November 2011 (UTC)[reply]

External links modified[edit]

Hello fellow Wikipedians,

I have just modified one external link on Definite clause grammar. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 11:33, 1 December 2016 (UTC)[reply]