[kde-edu]: Practice Sentence idea
alfraealba at gmail.com
Sun Mar 27 22:14:39 CEST 2011
I posted this in the Parley mailing this. I think it might be better to
put it in this list as to start this, I think I will need to amend the
KEduVocDocument class library.
I've written the following Python script that generates simple sentences
that can be copied and pasted into Parley to use as practice.
My intention is to incorporate this into Parley. Before I do, I would
look to get input on the best way to go about incorporating it. I've
tested this and the logic is sound so theoretically it shouldn't be too
hard to insert the code in but how would this work with grading? Would
the sentence be rated, errorcount and count or the individual words
contained in the sentence be amended? Will the words be dynamically
created each time the sentence practice option is entered or just
created once? Will the individual words be taken from the scope of the
lesson it belongs to or from the whole .kvmtl file?
This generates simple sentences but for anything more complex, the
generated output will either need to be manually amended by user or
extra coding will need to be done to do this automatically. I think the
latter should be used. I propose to do this by allowing the instructions
to do these extra steps for complex sentences to be stored as xml in the
.kvtml file which will 'instruct' Parley to do extra parsing on the
sentence. I will provide two examples on how this would work:
The simplest one is a question. The generator code only produces the
sentence but does not provide a question mark at the end. To implement
this, the following special grammar type would be entered in the .kvtml
To explain what happens, if Parley encounters a word attached to this
grammar type, it would see that context tag is sentence so the sentence
rather than a word is to be amended. It would then see from the position
tag that the position where action is going to happen is at end of
sentence (EOS). From the condition tag, there is no condition that needs
to be meet for this to occur. From the action tag, Parley then will
append the text ?.
To a slightly more complex example, some adverbs in Scottish Gaelic
lenite the word after it depending on the first or second letter of that
following word. Lention involves inserting h in the second position of
that word. An example of this mòr but with the adverb glè before it, it
becomes glè mhòr. To do this:
To explain this, from the context tag, Parley would be amending a word.
From the position, Parley would know it is the next word (a positive
number is words after the word with the lenition type attached, a
negative number means words before it). From the condition tag, only
words that met the following condition will be amended (I've used reg-ex
as an example and isn't the lenition rule). In the action, Parley would
then be instructed to insert text. The position of this insertion is
after first character (+1) and the text to be inserted is h.
In theory this sounds like it could work but I would be grateful if anybody sees any flaws or a better way of doing things.
More information about the kde-edu