=====================================================================
Matrix Yes-No Questions
=====================================================================
Yes-No questions in Malayalam are marked with an interrogative particle.
The suffix is attached to the main verb of the sentence, which is typically
the final element of the sentence.

The suffix -oo is appended to the verb:

    avan vannu     -> avan vannoo
    he   come-PAST    he came?

    avala varum    -> avala varumoo
    she   come-FUT    she will come?

In cases where the negative form of the verb is used, with a suffix of illa or
alla, the interrogative suffix changes to the form -ee

    avar vannilla      -> avar vannillee
    they come-PAST-NEG    they didn't come?


++++++++++++++++++++++++++
+ Grammar Implementation +
++++++++++++++++++++++++++

I created a lexical rule to inflect the verb to add the appropriate suffix.
It requires that the input is a verb, and has already been fully inflected.
The rule also sets the SF feature to ques.

; Inflection for question marker -oo or -ee suffix
quest-verb-rule := infl-add-only-ltol-rule &
                   [DTR verb-lex, INFLECTED +] &
                   [SYNSEM.LOCAL.CONT.HOOK.INDEX.SF ques] .


+++++++++++++++++++++++
+ Grammar performance +
+++++++++++++++++++++++

avan vannoo parses fine
The inflection for the other 2 isn't working.
The inflecting rules are not being applied to these cases, although I can
create the verb, and inflect it for tense.



NOTE: The suffix -oo is also used in coordination to mean 'or'
The grammar currently doesn't handle that.

=====================================================================
Clause Embedding Verbs
=====================================================================
Subordinate clauses are identified by their verb, which is in a NOML form.
There is a range of NOML suffixes which can be appended to the verb, including
-atx, -al, -(p)px, -tte, -ttam.
If there are inflections for tense, those are added first and the nominal
inflection is added after that.

The order in the sentence is for the embedded clause to come first, followed
by the main clause.

There is freedom in the order though, and the embedded clause may follow the
main clause in some cases.

In these examples, the embedded clause is indicated bythe NOML suffix -atx
added to the verb, and the embedded clause precedes the main clase.

    daraivar kaar etauttatx     kutataikala kanatau
    driver   car  take-PAST-NOM child-PL    see-PAST
    The children saw the driver take the car

    nii koozhaa vaangangaunnatx ellaavarum ariyum
    you bribe   take-PRES-NOML  all        know-FUT
    Everyone knows you take bribes


Questions are embedded in the main clause using the word ennx.
The embedded clause maintains its structure with the verb marked with the
interrogative particle.

    kumaar naalae   varumoo  ennx kutatai coodiccu
    Kumar  tomorrow come-FUT QP   child   ask-PAST
    The child asked whether Kumar would come tomorrow.

There are not enough examples in the book to clarify the difference between
embedded questions, and embedded quotes.  The Quotative Particle (QP) ennx is
used in Malayalam to indicate a quoted phrase.  
To make up an example, 
"Everyone says you take bribes" would have the format
you take bribes QP everyone says.

In the cases of embedded questions, all of the questions are about what
someone said or asked, so they all use the QP.  I think there might be
different forms in sentences such as "I wonder will Kumar come tomorrow?"  I
just don't have an example of that.

++++++++++++++++++++++++++
+ Grammar Implementation +
++++++++++++++++++++++++++

1. Implemented a lexical rule to add the nominal form to the verb in the
embedded clause.  (I ended up with 3, since I wasn't sure how to write a case
that included all the verb types while excluding other types.)

; Inflection for NOML marker, to indicate an embedded clause
nomnl1-verb-rule := infl-add-only-ltol-rule &
                   [DTR past-verb-rule] .

nomnl2-verb-rule := infl-add-only-ltol-rule &
                   [DTR pres-verb-rule] .

nomnl3-verb-rule := infl-add-only-ltol-rule &
                   [DTR futr-verb-rule] .


2. I created a lexical type for the clause embedding verbs.
It inherits from verb lex and clausal-second-arg-trans-lex-item, and includes
a complement which is a verb headed phrase to a proposition or a question.

clause-embed-verb-lex := verb-lex & clausal-second-arg-trans-lex-item & 
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps >,
    ARG-ST < [ LOCAL.CAT.HEAD noun & [CASE nom] ], #comps &
                                      [ LOCAL [ CAT [ VAL [ SPR < >,
                                                          COMPS < > ],
                                                      HEAD verb],
                                                CONT.HOOK.INDEX.SF prop-or-ques ] ] > ] .

3. There are 2 subtypes of the clause embedded verb-lex.
One is for verbs which embed a question, and one for verbs which embed a
proposition.  These contrain the complement to have the SF feature value ques
or prop.

ques-embed-verb-lex := clause-embed-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps & [ LOCAL.CONT.HOOK.INDEX.SF ques ] >,
    ARG-ST < [ LOCAL.CAT.HEAD noun & [CASE nom] ], #comps &
                                      [ LOCAL.CAT [ VAL [ SPR < >,
                                                          COMPS < > ],
                                                    HEAD verb] ] > ] .

prop-embed-verb-lex := clause-embed-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps & [ LOCAL.CONT.HOOK.INDEX.SF prop ] >,
    ARG-ST < [ LOCAL.CAT.HEAD noun & [CASE nom] ], #comps &
                                      [ LOCAL.CAT [ VAL [ SPR < >,
                                                          COMPS < > ],
                                                    HEAD verb] ] > ] .


4. I created lexical entries to correspond to these
see := prop-embed-verb-lex &
  [ STEM < "kanata" >,
    SYNSEM.LKEYS.KEYREL.PRED "_see_v_rel" ] .

know := prop-embed-verb-lex &
  [ STEM < "ariy" >,
    SYNSEM.LKEYS.KEYREL.PRED "_know_v_rel" ] .

ask := ques-embed-verb-lex &
  [ STEM < "coodicc" >,
    SYNSEM.LKEYS.KEYREL.PRED "_ask_v_rel" ] .



+++++++++++++++++++++++
+ Grammar performance +
+++++++++++++++++++++++

The first sentence parses.  I get several parses due to issues with my
imperative rules.

The second sentence does not parse.  I'm having trouble with determiners with
a dropped subject which prevents the parse.
The grammar parses fine if I change the sentence to:
    nii koozhaa vaangangaunnatx aalaukala ariyum
    you take bribes people know

The third sentence doesn't parse because I haven't implemented the QP yet.

=====================================================================
Imperatives
=====================================================================
The most basic form of imperative corresponds to the verb root.  Particles can
be added to strengthen or weaken the force.  There are also particles to
change the degree of politeness, as in Come! vs Please come!

They are used with the second person pronouns nii (singular) and ningangaala
(plural).  The pronouns may be dropped since the form of the imperative
changes form to correspond to number.

The examples use the verb varu - come.

The imperative is formed using the infinitive form of the verb.
    ningangaala veegam  varu
    you-PL      quickly come-IMP

Adding the suffix -ku to the infinitive form of the verb creates a polite
imperative.
    ningangaala varuka
    you-PL      come-POLITE-IMP


++++++++++++++++++++++++++
+ Grammar Implementation +
++++++++++++++++++++++++++
1. I added 2 imperative forms.  One for the regular imperative, which will
correspond to the infinitive form, and a polite imperative form which takes
and inflection.

imp := form .
imp-pol := form .

2. I created a lexical type for the imperative which contrains the 
; Imperative verbs
; constrain the head daughter to be form imp
imp-verb-lex := imp-head-opt-subj-phrase & 
    [ HEAD-DTR.SYNSEM.LOCAL.CAT.HEAD.FORM imp ].



3. I wrote inflection rules for the 2 types of imperatives.  One is not
   inflected, and the other is.

; Lexical rule to mark the verb as an imperative form
imp-verb-rule := infl-add-only-ltol-rule &
                   [ SYNSEM.LOCAL.CAT.HEAD.FORM imp,
                     INFLECTED - ] &
                   [ DTR verb-lex, INFLECTED -].

imp-pol-verb-rule := infl-add-only-ltol-rule &
                   [ SYNSEM.LOCAL.CAT.HEAD.FORM imp-pol ] & 
                   [ DTR verb-lex, INFLECTED +].


+++++++++++++++++++++++
+ Grammar performance +
+++++++++++++++++++++++

Both sentences parse.


