[GCompris] New grammar activities with internal dataset

Franklin Weng franklin at goodhorse.idv.tw
Thu Dec 14 03:25:32 GMT 2023


Hi,

A few suggestions -
1. If there are more than one nouns/verbs/... to be selected, maybe add a
hint if users choose less than the answers.  I was confused when I just
selected one noun and it just told me it was wrong, nothing else.
2. Some words are too close. (See screenshot:
https://nextcloud.slat.org/index.php/s/RdkxB2jL9TM2E3A )
3. I wonder how the languages other than en are applied.  Though I can
create json files for Traditional Chinese as well, what I'm thinking about
is to let kids(users) learn English/French/Spanish/... etc.  I created -en
json files, copied them to -it files, put some obvious differences like to
modify Find to ITFind.  Then select language to Italiano.  It still showed
Find instead of ITFind.  I even deleted -en files, leaving -it files only.
It still showed Find instead of ITFind.  I guess it didn't work the way I
thought it is.


Franklin

Johnny Jazeix <jazeix at gmail.com> 於 2023年7月24日 週一 下午11:57寫道:

> Hi,
>
> We have 2 new grammar activities in GCompris (thank you Bruno for
> these two new activities, they will be appreciated). The levels for each
> language are in separate .json files, to allow definitions of
> language-specific grammar classes and exercises.
>
> The 2 activities are very similar, the only difference is that one
> (grammar_classes) only asks for a single grammatical class per level,
> while the other (grammar_analysis) asks for several grammatical classes
> per level.
>
> We have made special development packages, with a special translator
> option activated to let you easily create and test localized json files.
>
> Linux (64bit):
> https://gcompris.net/beta-download/gcompris-qt-4.0-dev-grammar-Linux64.sh
> Windows (64bit):
> https://gcompris.net/beta-download/gcompris-qt-4.0-dev-grammar-win64.exe
> Android (32bit):
>
> https://gcompris.net/beta-download/GCompris-Android-release-signed-aligned-armeabi-v7a-dl-4.0-dev-grammar.apk
>
> To create json files for your languages, we have a very detailed README
> (
> https://invent.kde.org/education/gcompris/-/blob/master/src/activities/grammar_analysis/README.md
> ),
> but as it can be long to read, we tried to to summarize the most
> important points below.
>
> - First, copy the base example files
> (
> https://invent.kde.org/education/gcompris/-/blob/master/src/activities/grammar_analysis/examples/grammar_analysis-xx.json
> and
>
> https://invent.kde.org/education/gcompris/-/blob/master/src/activities/grammar_analysis/examples/grammar_classes-xx.json
> )
> to the following path depending on your operating system: on Linux, it
> is $HOME/.local/share/GCompris/, on Windows it is
> C:\Users\Username\AppData\Local\gcompris\, on Android it is
> /Android/data/net.gcompris.full/files/GCompris/.
>
> - In each file, start by editing the "syntax" section at the end. It
> must contain one entry for each of the grammatical classes that will be
> included in the sentences. For each entry, you'll need to set a "code"
> (a short identifier to refer to this class in the other sections), a
> "wordClass" (the full name of the class which will be displayed in the
> activity), and an "image" name for the symbol which will be associated
> to this class in the interface of the activity. There are currently 10
> images available, named "1.svg" to "10.svg". If you really need more,
> tell us and we'll add some.
>
> - Note that we only expect main grammatical classes, not sub-classes
> (for example in English, we only have one "pronoun" entry, not one for
> each type of pronoun).
>
> - The next section to edit is "dataset", in the middle of the files. It
> contains some groups of sentences which can be reused in different
> levels. It is also possible to create one sentence group per level, but
> the possibility to reuse sentence groups in different levels can reduce
> the amount of work for you and optimize the size of the packages. There
> are 3 groups by default (named "small", "medium" and "large"), but you
> can add as many groups as you need, and name them as you want.
>
> - Each entry in a sentence group has a "sentence" value (to write the
> actual sentence to display) and an "answer" value which must contain the
> list of grammatical classes corresponding to the words in the sentence,
> in the same order. If you want, you can add more than one space between
> identifiers to align them visually with the words. Example:
>        { "sentence": "The flower is very pretty."
>        , "answer":   "dtm nou   vrb adv adj"
>        }
>
> - If you need you can group several words to match a single class by
> using parenthesis. The only limitation is that the grouped words must be
> next to each-others. Example:
>        { "sentence": "I (am reading) the news."
>        , "answer":   "prn   vrb      dtm nou"
>        }
>
> - If your language allows to agglutinate words together, you can specify
> more than one class for a word by using +. Example:
>        { "sentence": "ശേഷം ആനയോടി."
>        , "answer":   "avyayam naamam+kriya"
>        }
>
> - As a general advice, please try to make relatively small/medium sized
> sentences, and using small/medium sized words, else the sentences might
> overflow the allocated screen space.
>
> - The last section, at the beginning of the file, is to create "levels".
> Each level contains 4 values:
> "objective": the description displayed in the activity.
> "difficulty": the difficulty level (not used for now).
> "exercise": the name of the sentence group to use.
> "goal": the list of grammatical classes to identify in this level.
>
> In the provided development packages, as the translationMode is
> activated, all the sentences in the exercise groups will be displayed
> for each level, in the same order as they are written in the json file.
> Else for users, sentences will be filtered to use only those containing
> at least one of the requested classes (in the goal) in the level, and in
> random order.
>
> If you need more info, please read the README, and if you still have
> some doubts you can ask us.
>
> When your files are ready, you can send them directly to me or Timothée
> and we will add them to the activities if you don't have direct commit
> access.
>
> These activities will be in our next release that we usually plan to
> do between December/January.
>
> Cheers,
>
> Timothée & Johnny
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gcompris-devel/attachments/20231214/d7125892/attachment.htm>


More information about the GCompris-devel mailing list