[kde-edu]: Re: Practice Sentence idea

Anne-Marie Mahfouf annemarie.mahfouf at free.fr
Mon Mar 28 07:47:10 CEST 2011

On Sunday, March 27, 2011 10:14:39 PM alsaf wrote:
> 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.
Did you get any answer from the Parley list?
> I've written the following Python script that generates simple sentences
> that can be copied and pasted into Parley to use as practice.
> http://kde-files.org/content/show.php/Parley+Sentence+Generator?content=138
> 154
You put this script as a Pastebin Script on kde-files.org thus it appears very 
wrongly when you want to add a new pastebin in the Pastebin Applet. Please 
remove the script from there and put it on kde-apps.org or elsewhere.
kde-files.org is a repository for KNewStuff files and there is no KNewStuff 
support for Parley script.

I cannot comment on the script itself as I don't see the use case nor did I 
tested the script. If I understand correctly, the use case is to learn the 
grammar of a language?

Best regards,

> 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
> file:
> <special-grammar-type>
> <name>question</name>
> <context>sentence</context>
> <position>EOS</position>
> <condition>none</condition>
> <action>
> <type>Append></type>
> <text>?</text>
> </action>
> </special-grammar-type>
> 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:
> <special-grammar-type>
> <name>lenition</name>
> <context>word</context>
> <position>+1</position>
> <condition>[aeiou].*</condition>
> <action>
> <type>insert></type>
> <position>+1,/position>
> <text>h</text>
> </action>
> </special-grammar-type>
> 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.
> _______________________________________________
> kde-edu mailing list
> kde-edu at mail.kde.org
> https://mail.kde.org/mailman/listinfo/kde-edu

More information about the kde-edu mailing list