% English Module for Part 2 of Lab 7

:- module(eng,[]).

%definition of question

  qn(question(I,V,NP)) --> ie(I), vb(V, [_]), ne(NP, [_]).
  qn(question(I,V,NP)) --> ie(I), vb_to_be(V, [Num]), ne(NP, [Num]).

  % N.B. 
  % agreement with number in verb and noun_phrase only occurs with verb "to be"
  % e.g. "who are the students" -vs- "who is the student"
  % but we could have either "who studies english" and "who study english"
  % In the latter case, the verb is connected with the pronoun 'who'.

%noun phrase breakdown

  ne(np(O,P,N), [Num]) --> ot(O, [Num]), pn(P), nn(N, [_, proper]).

%object breakdown

  ot(obj(N), [singular]) --> nn(N, [singular, uncountable]).

%interrogative (add in interrogative "what")

  ie(irr(who)) --> [who].  
   
%verbs (add in "to teach" and "to be")

  vb(verb(to_study), [singular]) --> [studies].
  vb(verb(to_study), [plural]) --> [study].

%determiners (add in determiners: a, some, the) 

  dr(det(every), [singular]) --> [every].

%preposition (written as prep)

  pn(prep(of)) --> [of].

%nouns

  %proper nouns (add names alberto, jose, and bella)
  nn(noun(carl), [singular, proper]) --> [carl].
  nn(noun(john), [singular, proper]) --> [john].
  nn(noun(maria), [singular, proper]) --> [maria].
  nn(noun(ramona), [singular, proper]) --> [ramona].

  %countable nouns (add in countable nouns: dog, brother and sister)

  %uncountable nouns
  nn(noun(english), [singular, uncountable]) --> [english].
  nn(noun(mathematics), [plural, uncountable]) --> [mathematics].
  nn(noun(spanish), [singular, uncountable]) --> [spanish].
