A couple of question on Pronoun, NP, and negations in RGL

16 views
Skip to first unread message

Roman Suzi

unread,
Jul 14, 2020, 2:50:46 AM7/14/20
to Grammatical Framework
hi!

I am trying to understand some design decisions done in RGL.

1. Many RGs I looked into do have NP and Pronoun very similar or even identical, and at the same time loaded with all those possessive pronoun forms. (well, romance sets possessive forms aside - only present in Pronoun, but there NounPhrase is quite complicated anyway:
s : Case => {c1,c2,comp,ton : Str}
). I do not understand why NP should have pronoun forms inside? Unless I missed something, it's the PossNP, which needs it, but why complicating everything else? If the case is forming "my car" vs "car of mine", there could be some other category for that? (also in Russian it is possible to omit the noun altogether, for example, one can speak:  "my did this' (usually about husband). Are there any pointers to the theory of current possessive pronoun / NP handling?

2. Another question is regarding negation. Looking into old Russian grammar I am finding only sentence-level negation, with the only tweak to provide "per-quality" negation via having negative particle after the verb. I guess, double negation may be not that common, but in Russian it should be possible to put all negations where due, even if it means something like:

(not X) not (do) not (this) and not (that) not (here)

again, maybe I am missing something, but there are now means to do (put negations around the verb):

X not do this   (= "not true that X do this")
and
X do not this   (= "X do something else but this")

which covers many cases, but is hackish and (unnecessarily) complicates expressing semantics in a more logical way.
On page 124 of Janna Khegai's thesis I see only this explanation: "Note: we omit a dash-because it will cause problems with negation word order: "

This is just a partial case of a more fundamental problem of not being able to express negations:

"not (X is Y)"                   (this whole sentence negation one is more like   "X is-not Y" and currently supported in RG)
and "X is (not Y)".           (this basically says, that "X is something, but that something is not Y")
and there is also "(not X) is Y"       (this says, that "something is Y, but that something is not X")
and (theoretically) also "(not X) is (not Y)" and even nested "not (X is (not Y))", but nested cases can be better expressed using clauses like "not true, that X is (not Y)".

To be fair, Russian negations is a big can of semantic worms. I am not concerned with that as it's application side concern to select lexical material. But I wonder if more targeted negations should be part of resources?

Probably, simple but potentially fragile workaround can be just a fake adjective/determiner(?) "не" for "not". Any other ideas?

With best regards,
Roman

Inari Listenmaa

unread,
Jul 14, 2020, 4:22:42 AM7/14/20
to gf-...@googlegroups.com
Hi Roman,

1. As for the NPs with pronoun forms, a NP can come from a Pron in UsePron : Pron -> NP. My guess for why a NP would have a separate pronoun forms is that NPs don't inflect and only pronouns do, but hard to say without examples. But if the NP includes both pronoun forms and a regular case inflection with the same cases, that does raise suspicions of redundancy. Maybe the grammar was different at one point (applies for the oldest RGL modules), or the grammarian simply thought of a better way to implement things, and didn't bother to restructure. You could start without separatepronoun forms and see how far you get, and if it turns out you do need them as a separate table from the normal case inflection of NP, then you can add them.

It's useful to look at other languages, but also to remember that different languages need different distinctions. For instance, in Hungarian grammar, all NPs include all possessed forms (the NP of "a car" includes "my car", "your car", …) because of have_V2. The correct way to say "I have a car" is "to me is my car". That's why the form "my car" (which is in reality formed with possessive suffix, which causes stem changes, so not possible to just BIND it on afterwards) remains in NPs, and not just CNs.

As for why the Romance NPs are so complex, it's because of pronominal objects: "veo un gato" vs. "lo veo", and probably bunch of other stuff that happens only in French. :-P

2. If the language can say both "X not do this" and "X do not this", and they mean a different thing, then those should be different abstract syntax trees. The former is a sentence negation, the latter has the object NP negated, like [not this]:NP.
If there are differences in the position for the same type of negation, you can add a parameter like NegPosition in Dutch https://github.com/GrammaticalFramework/gf-rgl/blob/master/src/dutch/ResDut.gf#L534-L547 for three patterns of sentence negation: "ik schoop X niet (normal verb) ; ik houd niet van X (object introduced with a preposition); dat is niet leuk (predicative adjective)".

Some of the more advanced negations are in Extend module, e.g. https://github.com/GrammaticalFramework/gf-rgl/blob/master/src/abstract/Extend.gf#L125-L127 for "there is no tree" as a negation of "there is a tree", instead of standard RGL existential negation "there isn't a tree". I agree that more of these patterns would be helpful for application grammarians. Feel free to contribute to Extend, that's a rather new resource and doesn't have the baggage of having to be kept backwards compatible.

Inari

-- 

--- 
You received this message because you are subscribed to the Google Groups "Grammatical Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gf-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gf-dev/f0a41e4f-e58c-4722-8a4d-c3fd6c335930o%40googlegroups.com.

Roman Suzi

unread,
Jul 14, 2020, 4:59:37 AM7/14/20
to Grammatical Framework
Hi Inari,

thanks for good pointers! Some comments inside:


On Tuesday, July 14, 2020 at 11:22:42 AM UTC+3, Inari wrote:
Hi Roman,

1. As for the NPs with pronoun forms, a NP can come from a Pron in UsePron : Pron -> NP. My guess for why a NP would have a separate pronoun forms is that NPs don't inflect and only pronouns do, but hard to say without examples. But if the NP includes both pronoun forms and a regular case inflection with the same cases, that does raise suspicions of redundancy. Maybe the grammar was different at one point (applies for the oldest RGL modules), or the grammarian simply thought of a better way to implement things, and didn't bother to restructure. You could start without separatepronoun forms and see how far you get, and if it turns out you do need them as a separate table from the normal case inflection of NP, then you can add them.

Unfortunately, I already need them. Actually, Russian does have "possessive case" even for nouns (like one can have a special case for "mother" to express "mother's car", though it's colloquial, in addition to "car [of] mother"), but possessive pronouns are adjectivized - so NP can't get away with just Case => Str, and needs adjective-like possessive pronoun forms... And NP can't settle down that early to specific gender/animacy due to governance and agreement relations up the hierarchy...

The NP is because more like A + N (because possessive pronoun is like adjective), and it's possibly more economically to treat NP as Pron + N (which in reality is just Pron, because N forms can fit inside anyway...).

So I probably have no choice but use those forms so it's in line with the rest.

 

It's useful to look at other languages, but also to remember that different languages need different distinctions. For instance, in Hungarian grammar, all NPs include all possessed forms (the NP of "a car" includes "my car", "your car", …) because of have_V2. The correct way to say "I have a car" is "to me is my car". That's why the form "my car" (which is in reality formed with possessive suffix, which causes stem changes, so not possible to just BIND it on afterwards) remains in NPs, and not just CNs.

As for why the Romance NPs are so complex, it's because of pronominal objects: "veo un gato" vs. "lo veo", and probably bunch of other stuff that happens only in French. :-P

2. If the language can say both "X not do this" and "X do not this", and they mean a different thing, then those should be different abstract syntax trees. The former is a sentence negation, the latter has the object NP negated, like [not this]:NP.
If there are differences in the position for the same type of negation, you can add a parameter like NegPosition in Dutch https://github.com/GrammaticalFramework/gf-rgl/blob/master/src/dutch/ResDut.gf#L534-L547 for three patterns of sentence negation: "ik schoop X niet (normal verb) ; ik houd niet van X (object introduced with a preposition); dat is niet leuk (predicative adjective)".

Yes, but negPosition is part of VP so it's an approximation. how to form   "het is niet leuk en smerig" or "het is niet leuk en niet smerig"
(hopefully, GT did it right ;-) I am not sure whether it's correct Dutch.
 

Some of the more advanced negations are in Extend module, e.g. https://github.com/GrammaticalFramework/gf-rgl/blob/master/src/abstract/Extend.gf#L125-L127 for "there is no tree" as a negation of "there is a tree", instead of standard RGL existential negation "there isn't a tree". I agree that more of these patterns would be helpful for application grammarians. Feel free to contribute to Extend, that's a rather new resource and doesn't have the baggage of having to be kept backwards compatible.

Yes, this is always a possibility.

-Roman
 

Inari

To unsubscribe from this group and stop receiving emails from it, send an email to gf-...@googlegroups.com.

Roman Suzi

unread,
Jul 14, 2020, 5:25:28 AM7/14/20
to Grammatical Framework
Here is the scale of "explosion" in old Russian RG, more visible with PN:

Just PN is very simple (though I will replace those Other/VNa with Pre and Loc as more "scientific" and flat structure):

> cc -table john_PN
s . ResRus.Nom => Иван
s . ResRus.Gen => Ивана
s . ResRus.Dat => Ивану
s . ResRus.Acc => Иван
s . ResRus.Inst => Иваном
s . ResRus.Prepos ResRus.PrepOther => Иване
s . ResRus.Prepos ResRus.PrepVNa => Иване
anim . ResRus.Inanimate
g . ResRus.Masc


Now this is same John in an NP:

> cc -table UsePN john_PN
s . ResRus.PF ResRus.Nom ResRus.Yes ResRus.NonPoss => Иван
s . ResRus.PF ResRus.Nom ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иван
s . ResRus.PF ResRus.Nom ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иван
s . ResRus.PF ResRus.Nom ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иван
s . ResRus.PF ResRus.Nom ResRus.Yes (ResRus.Poss ResRus.GPl) => Иван
s . ResRus.PF ResRus.Nom ResRus.No ResRus.NonPoss => Иван
s . ResRus.PF ResRus.Nom ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иван
s . ResRus.PF ResRus.Nom ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иван
s . ResRus.PF ResRus.Nom ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иван
s . ResRus.PF ResRus.Nom ResRus.No (ResRus.Poss ResRus.GPl) => Иван
s . ResRus.PF ResRus.Gen ResRus.Yes ResRus.NonPoss => Ивана
s . ResRus.PF ResRus.Gen ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Ивана
s . ResRus.PF ResRus.Gen ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Ивана
s . ResRus.PF ResRus.Gen ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Ивана
s . ResRus.PF ResRus.Gen ResRus.Yes (ResRus.Poss ResRus.GPl) => Ивана
s . ResRus.PF ResRus.Gen ResRus.No ResRus.NonPoss => Ивана
s . ResRus.PF ResRus.Gen ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Ивана
s . ResRus.PF ResRus.Gen ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Ивана
s . ResRus.PF ResRus.Gen ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Ивана
s . ResRus.PF ResRus.Gen ResRus.No (ResRus.Poss ResRus.GPl) => Ивана
s . ResRus.PF ResRus.Dat ResRus.Yes ResRus.NonPoss => Ивану
s . ResRus.PF ResRus.Dat ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Ивану
s . ResRus.PF ResRus.Dat ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Ивану
s . ResRus.PF ResRus.Dat ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Ивану
s . ResRus.PF ResRus.Dat ResRus.Yes (ResRus.Poss ResRus.GPl) => Ивану
s . ResRus.PF ResRus.Dat ResRus.No ResRus.NonPoss => Ивану
s . ResRus.PF ResRus.Dat ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Ивану
s . ResRus.PF ResRus.Dat ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Ивану
s . ResRus.PF ResRus.Dat ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Ивану
s . ResRus.PF ResRus.Dat ResRus.No (ResRus.Poss ResRus.GPl) => Ивану
s . ResRus.PF ResRus.Acc ResRus.Yes ResRus.NonPoss => Иван
s . ResRus.PF ResRus.Acc ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иван
s . ResRus.PF ResRus.Acc ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иван
s . ResRus.PF ResRus.Acc ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иван
s . ResRus.PF ResRus.Acc ResRus.Yes (ResRus.Poss ResRus.GPl) => Иван
s . ResRus.PF ResRus.Acc ResRus.No ResRus.NonPoss => Иван
s . ResRus.PF ResRus.Acc ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иван
s . ResRus.PF ResRus.Acc ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иван
s . ResRus.PF ResRus.Acc ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иван
s . ResRus.PF ResRus.Acc ResRus.No (ResRus.Poss ResRus.GPl) => Иван
s . ResRus.PF ResRus.Inst ResRus.Yes ResRus.NonPoss => Иваном
s . ResRus.PF ResRus.Inst ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иваном
s . ResRus.PF ResRus.Inst ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иваном
s . ResRus.PF ResRus.Inst ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иваном
s . ResRus.PF ResRus.Inst ResRus.Yes (ResRus.Poss ResRus.GPl) => Иваном
s . ResRus.PF ResRus.Inst ResRus.No ResRus.NonPoss => Иваном
s . ResRus.PF ResRus.Inst ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иваном
s . ResRus.PF ResRus.Inst ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иваном
s . ResRus.PF ResRus.Inst ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иваном
s . ResRus.PF ResRus.Inst ResRus.No (ResRus.Poss ResRus.GPl) => Иваном
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.Yes ResRus.NonPoss => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.Yes (ResRus.Poss ResRus.GPl) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.No ResRus.NonPoss => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepOther) ResRus.No (ResRus.Poss ResRus.GPl) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.Yes ResRus.NonPoss => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.Yes (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.Yes (ResRus.Poss ResRus.GPl) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.No ResRus.NonPoss => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Masc)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Fem)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.No (ResRus.Poss (ResRus.GSg ResRus.Neut)) => Иване
s . ResRus.PF (ResRus.Prepos ResRus.PrepVNa) ResRus.No (ResRus.Poss ResRus.GPl) => Иване
anim . ResRus.Inanimate
g . ResRus.PGen ResRus.Masc
n . ParamX.Sg
p . ParamX.P3
pron . Prelude.False

I think in case of Russian it would help to refer to possessive pronouns (there is a limited number of those) and glue when needed. Luckily, Russian does not have things like "minun autoni" in Finnish, so more complexity will be added to linearization, but lookup can probably be made lighter with something like:

NP = {
s : Case => Str ;
poss :
PronTable ;
 a : Agr
} ;

where the following "supertype" to AdjTable: Without some Russian adjective niceties like short forms and comparative:

PronTable = GenNum => Animacy => Case => Str ;

and one "nullPron" table, pointing everything to [].

Interesting, that the new idea about record-based lexical descriptions still holds.

-Roman

On Tuesday, July 14, 2020 at 11:22:42 AM UTC+3, Inari wrote:
Hi Roman,

1. As for the NPs with pronoun forms, a NP can come from a Pron in UsePron : Pron -> NP. My guess for why a NP would have a separate pronoun forms is that NPs don't inflect and only pronouns do, but hard to say without examples. But if the NP includes both pronoun forms and a regular case inflection with the same cases, that does raise suspicions of redundancy. Maybe the grammar was different at one point (applies for the oldest RGL modules), or the grammarian simply thought of a better way to implement things, and didn't bother to restructure. You could start without separatepronoun forms and see how far you get, and if it turns out you do need them as a separate table from the normal case inflection of NP, then you can add them.

It's useful to look at other languages, but also to remember that different languages need different distinctions. For instance, in Hungarian grammar, all NPs include all possessed forms (the NP of "a car" includes "my car", "your car", …) because of have_V2. The correct way to say "I have a car" is "to me is my car". That's why the form "my car" (which is in reality formed with possessive suffix, which causes stem changes, so not possible to just BIND it on afterwards) remains in NPs, and not just CNs.

As for why the Romance NPs are so complex, it's because of pronominal objects: "veo un gato" vs. "lo veo", and probably bunch of other stuff that happens only in French. :-P

2. If the language can say both "X not do this" and "X do not this", and they mean a different thing, then those should be different abstract syntax trees. The former is a sentence negation, the latter has the object NP negated, like [not this]:NP.
If there are differences in the position for the same type of negation, you can add a parameter like NegPosition in Dutch https://github.com/GrammaticalFramework/gf-rgl/blob/master/src/dutch/ResDut.gf#L534-L547 for three patterns of sentence negation: "ik schoop X niet (normal verb) ; ik houd niet van X (object introduced with a preposition); dat is niet leuk (predicative adjective)".

Some of the more advanced negations are in Extend module, e.g. https://github.com/GrammaticalFramework/gf-rgl/blob/master/src/abstract/Extend.gf#L125-L127 for "there is no tree" as a negation of "there is a tree", instead of standard RGL existential negation "there isn't a tree". I agree that more of these patterns would be helpful for application grammarians. Feel free to contribute to Extend, that's a rather new resource and doesn't have the baggage of having to be kept backwards compatible.

Inari
To unsubscribe from this group and stop receiving emails from it, send an email to gf-...@googlegroups.com.

Roman Suzi

unread,
Jul 14, 2020, 8:57:49 AM7/14/20
to Grammatical Framework
Seems like all that Possessive complexity is essentially used in jsut two functions:


 PossPron : Pron -> Quant ;    -- my (house)
 ComplN2 : N2 -> NP -> CN ;    -- mother of the king

here all related types:

 N  = {s : NForm => Str; g : Gender; anim : Animacy} ;
 N2 = {s : NForm => Str; g : Gender; anim : Animacy} ** {c2 : Complement} ;
 NForm =    NF Number Case Size ;

 CN = {nounpart : NForm => Str; relcl : Number => Case => Str; g : Gender; anim : Animacy} ;
 Quant = {s : AdjForm => Str;                            g: PronGen; c: Case; size: Size}

 NP   = {s : PronForm => Str ; n : Number ; p : Person ; g: PronGen ; anim : Animacy ; pron: Bool} ;
 Pron = {s : PronForm => Str ; n : Number ; p : Person ; g: PronGen ;                  pron: Bool} ;
 PronForm = PF Case AfterPrep Possessive;
 PronGen = PGen Gender | PNoGen ;
 Possessive = NonPoss | Poss GenNum ;


PossPron can be rewritten without any Possessive keying, but ComplN2 is much harder case (the information flow is somewhat backwards).
Also pron flag's only purpose is to indicate NP is personal pronoun. Maybe, as a compromise support for the possessive pronoun trick in ComplN2 can be dropped in the new RusRg... It should be still possible to express the same via Quant, etc. Resulting drop in complexity is very appealing.

The problem why Case => Str and possessive info can't separated is due to ListNP / ConsNP / ConjNP, which can't really support those in parallel (that is probably the reason old single table works albeit with a gross explosion of values).

- Roman

Inari Listenmaa

unread,
Jul 14, 2020, 9:05:05 AM7/14/20
to gf-...@googlegroups.com
This is often the right thing to do. RGL isn't supposed to provide translation equivalents, so as long as the correct expression is produced by some RGL tree, it is fine that others are weird.

That said, nobody will complain if RGL trees actually do become more idiomatic--it just makes it easier to adopt new languages in application grammars by copypaste or functor. But it's not strictly necessary to have every single RGL tree to be correct, for RGL to fulfil its purpose as a useful library.

When you introduce things that you know are wrong (that's not a critique, I do it myself all the time!), a good practice is to document them in a README file under "known issues". Like here for Catalan: https://github.com/GrammaticalFramework/gf-rgl/tree/master/src/catalan#known-issues

Inari
Reply all
Reply to author
Forward
0 new messages