3 Replies - 1629 Views - Last Post: 15 August 2012 - 12:16 PM

#1 TechSyndrome  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 135
  • Joined: 06-May 12

Artificial Intelligence/Prolog - Def Clause Grammar Disjunction

Posted 14 August 2012 - 09:53 PM

Hi. I'm trying to write a definitine clause grammar:

Posted Image

So far for the first bullet point, I have written (please read after //... for my problem):

Sentence --> pronoun, verb // do I enter the "noun-phrase or an adverb" here? And why? I'm confused because if I were to separate it on another line, there appears to be no parameters
Pronoun --> [he]
Pronoun --> [she]

verb --> [sees]
verb --> [smells]

noun_phrase --> determiner
pronoun --> [his]
pronoun --> [her]
noun --> [food]

This post has been edited by TechSyndrome: 14 August 2012 - 10:13 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Artificial Intelligence/Prolog - Def Clause Grammar Disjunction

#2 TechSyndrome  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 135
  • Joined: 06-May 12

Re: Artificial Intelligence/Prolog - Def Clause Grammar Disjunction

Posted 14 August 2012 - 10:24 PM

Posted Image

Better, anyone?

This post has been edited by TechSyndrome: 14 August 2012 - 10:24 PM

Was This Post Helpful? 0
  • +
  • -

#3 TechSyndrome  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 135
  • Joined: 06-May 12

Re: Artificial Intelligence/Prolog - Def Clause Grammar Disjunction

Posted 14 August 2012 - 10:29 PM

My lecture slide shows:

Posted Image

So perhaps it should be:

Sentence --> pronoun, verb
Sentence --> noun_phrase
Sentence --> adverb

?
Was This Post Helpful? 0
  • +
  • -

#4 sepp2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2153
  • View blog
  • Posts: 3,311
  • Joined: 21-June 11

Re: Artificial Intelligence/Prolog - Def Clause Grammar Disjunction

Posted 15 August 2012 - 12:16 PM

The solution in your second post is wrong because it says "a sentence must have noun_phrase and an adverb", but what we want is "or", not "and".

The solution in your third post is wrong because it says that a noun_phrases and adverbs can be sentences on their own - you no longer need a pronoun and a verb.

A correct solution would make sure that each sentence starts with a pronoun followed by a verb and that the third part is either a noun phrase or an adverb.

The most obvious way to express that (or at least the way that most closely matches the phrasing of the assignment) would be something like "sentence --> pronoun, verb, (noun_phrase OR adverb)", but there's no OR-operator in the list of notations you were given, so the only way you can express an choice is by using multiple rules.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1