A hack to get bare plurals in languages that don't have it

25 views
Skip to first unread message

Giuliano Lancioni

unread,
Feb 4, 2023, 6:59:19 AM2/4/23
to Grammatical Framework
After some struggle, I found a hack that allows to get bare plurals in languages (such as French) that can't generate it in the RGL. I'm sharing it in the hope that it can be useful to other people having the same need.

While in English aPl_Det generates yields a bare plural, in French it generates a plural with a "de" + article, which is nice in most cases, but is sometimes a problem. Specifically, I had the issue to reproduce a multilingual industrial item list where items where bare plurals in French too.

The hack capitalizes on Inari's great suggestion to generate plurals after fractions by using an arbitrary literal as a cardinal number, which triggers plural agreent (https://stackoverflow.com/questions/67171468/using-fractions-in-gf).

The only change needed to yield bare plurals is to use a dummy empty cardinal, which triggers plural agreement without surfacing.

Here are the relevant code snippets:

concrete WorkerFre of Worker = WorkerI - [Categorical] with
    (Syntax = SyntaxFre),
    (LexWorker = LexWorkerFre) ** open SyntaxFre in {
  lin
    Categorical n = mkUtt (mkNP dummy_Card n) ;
}

instance LexWorkerFre of LexWorker = open SyntaxFre, ParadigmsFre, SymbolicFre in {
  oper
    combinationWrench_N = mkCN (mkA "mixte")  wrench_N ;
    wrench_N = mkCN (mkN "clé" feminine); 
    dummy_Card : Card = symb (mkSymb "") ;
}

Needed parts are in boldface (the rest of the code is specific to my implementation).

Hope this may help somebody,

Giuliano

Inari

unread,
Feb 8, 2023, 6:38:44 AM2/8/23
to Grammatical Framework
Hi Giuliano,

Glad that you found a workaround and shared it with others!

It's true that the current RGL functions don't cover for bare plurals. For singulars, there are a few options: 
- UttCN : CN -> Utt in the core RGL, to get a standalone singular CN without any articles;
CompBareCN : CN -> Comp in Extend, for structures like "is teacher";
PrepCN : Prep -> CN -> Adv in Extend, for structures like "by accident". 

Unlike RGL's stable core and API, which have been unchanged for over a decade, the Extend module is constantly extended. So if anyone finds themselves in a similar situation, in that the RGL doesn't cover their needs, you could open an issue on gf-rgl (github.com/GrammaticalFramework/gf-rgl/issues) and describe what you want to say but RGL doesn't allow it. 

Inari

Giuliano Lancioni

unread,
Feb 9, 2023, 5:13:54 PM2/9/23
to Grammatical Framework
Great info, Inari, thanks!

Are CompBareCN and/or PrepCN appliable to plural nouns too, e.g., "are teachers" or "by steps"?

Giuliano

Inari Listenmaa

unread,
Feb 10, 2023, 9:29:44 PM2/10/23
to gf-...@googlegroups.com
No, those functions are just for singular forms. I guess that it hasn’t been necessary to add corresponding plural functions before, because English is the most used RGL language, and you get the same effect from the following core RGL trees:

1. CompNP (DetCN (DetQuant IndefArt NumPl) cn)
2. PrepNP prep (DetCN (DetQuant IndefArt NumPl) cn)

However, we could easily add functions to Extend and call them e.g. CompBarePlCN and PrepPlCN. And their definitions in ExtendFunctor would be the trees 1. and 2. above.

I have been pretty liberal in adding new funs to Extend, when the structure is new in the whole RGL. However, I tend to be more cautious when the new structure causes ambiguity for English parsing. This is irrational, because the RGL was not meant for parsing in the first place, but I’m used to getting questions from people who are using AllEng (which includes Extend) for parsing, and wonder why simple sentences get so many parses.¹ So that has made me cautious about adding structures like these into Extend, even though I like to claim that Extend can be freely extended.

Maybe the solution is to just extend Extend with the union of the linguistic distinctions needed across the RGL languages, and keep a curated subset of core+Extend that is well-behaved for parsing English? Does anyone else have opinions on this?

Inari


¹ ) Although the worst offenders are already in the core RGL; it’s ApposCN combined with DetNP + plural indefinite article, which creates an NP consisting of an empty string.


On 10 Feb 2023, at 06:13, Giuliano Lancioni <glan...@gmail.com> wrote:

Great info, Inari, thanks!
--

---
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/3eec2616-1c63-4590-b087-75025f83c81fn%40googlegroups.com.

Giuliano Lancioni

unread,
Feb 20, 2023, 10:08:32 AM2/20/23
to Grammatical Framework
Just an additional question: is there a way to get a determinerless singular NP as "patience" in "patience is a virtue"? I guess you end up with an article in any case if you have a NP, don't you?

Thank you,

Giuliano

Giuliano Lancioni

unread,
Feb 20, 2023, 11:51:37 AM2/20/23
to Grammatical Framework
No, I'm wrong, it is what already happens in English. The problem obtains in Romance languages, where a determiner is inserted. There exists something like a symbol that can replace "one" as a cardinal (as happens for a generic plural cardinal)?
Reply all
Reply to author
Forward
0 new messages