Bug 93446

Summary: Give up the concept of 'original' language and make all languages interchangeable
Product: kvoctrain Reporter: Marc Heyvaert <marc_heyvaert>
Component: generalAssignee: Frederik Gladhorn <gladhorn>
Status: RESOLVED FIXED    
Severity: wishlist CC: esigra, glasse, salim
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: A vocabulary file with Chinese characters, Pinyin and English
What happens if I change the "original language"

Description Marc Heyvaert 2004-11-17 14:20:45 UTC
Version:           0.8.1 (using KDE KDE 3.2.1)
Installed from:    SuSE RPMs
OS:                Linux

The kvoctrain file structure uses the concept o an 'original' language, qualifying the other languages as translations of this orginal language. While this makes sense for general usage of languages (A translates into B; A translates into C ==> B translates into C does not always hold!) It is valid for a lot of specific uses, read lexicologies. KVoctrain is limiting in this respect because you can not generate exercises between 'translated' languages.

A second wish, but closely related to this one is that the concept of 'language' may be too limiting as well. Take the example of Chinese. We have simplified characters, traditional characters, and a few popular romanisations (e.g. pinyin, Wade-Giles). Ideally one would have one kvoctrain file that contains all these elements with a possibility of generating quizzes between all these 'forms' of the chinese language, in all directions.

Pls see this mail for the original discussion:

http://lists.kde.org/?l=kde-edu-devel&m=110054525408899&w=2

Marc
Comment 1 Marc Heyvaert 2004-11-23 15:18:48 UTC
Created attachment 8403 [details]
A vocabulary file with Chinese characters, Pinyin and English

I taught I could circumvent one of the language limitations...not.

I started creating a vocabulary file containing all the (simplified) Chinese
characters + their Pinyin transcription (= a system of transcribing Chinese
using roman alfabet + a translation in English.

I used 'Chinese' twice, once as original language, once as translation. This is
not blocked by kvoctrain, as you can see, but you can not generate questions
using Chinese/Chinese. With English it is ok. Now try to change the name of the
first translation from Chinese into (say) French. Now generating questions
works as to be expected.

So 2 issues : (1) Checking for duplicate languages when defining them and
blocking this...or allowing it, but then the necessary stuff has to be done to
remove the problem with the generation of tests. (2) Perhaps -short term- it is
possible to add the possibility to define your own 'custom' languages on top of
the KDE and ISO possibilities. This would be sufficient for me to continue my
work on this vocabulary, without having to use a work-around like pretending
that French is Chinese (perhaps not far of the mark :)	).

Marc
Comment 2 Ethan Glasser-Camp 2004-12-01 02:14:12 UTC
But I don't think that's the only problem. I did a similar thing except that I generated another language (with country code "py" for Pinyin) -- my file has three columns, one for English, one for Chinese, and one for Pinyin. I would like to be able to test my ability to write Chinese characters from Pinyin. However, if I select "Set Language->Original Language" to Pinyin, it doesn't change the column of Pinyin words to the position of original language -- it just changes the English column to be named "Pinyin". So if I try to create a query from Pinyin to Chinese, it only queries from English to Chinese.

If this bug were addressed, so that I could query from Pinyin to Chinese, it would be cool.

Ethan Glasser-Camp
Comment 3 Ethan Glasser-Camp 2004-12-01 02:16:11 UTC
Created attachment 8498 [details]
What happens if I change the "original language"
Comment 4 Peter Hedlund 2005-06-08 23:54:42 UTC
Having thought about this during the last few days I have realized that it is maybe not all that simple. If more than two languages are still going to be allowed there are at least two major problems:
1. As pointed out already in the original report all possible combinations may not be valid (B into C above) for queries. This risk of course has to be assumed by the user, but the guidance provided by the concept of an original language is valuable.
2. The second is more of a technical challenge. KVocTrain stores statistics about your learning. This can now be done by storing two values for each translation (to and from original). If any combination of queries is made possible you can pretty soon end up with a large matrix of result data that needs to be stored. There is a debate whether statistical data should be stored in the data file itself or separate from it. Either way this can be a problem.

In conclusion, I used to be in favor of this wish, but I am not so sure anymore. Even though it is a little more work for the user it is probably just as good to create different files, each with a different original language.
Comment 5 Peter Hedlund 2006-04-26 04:21:56 UTC
*** Bug 126263 has been marked as a duplicate of this bug. ***
Comment 6 Salim 2006-08-14 15:46:50 UTC
To be honest: the statistics don't interest me. All I want to have, is to be able to get also quizzed from language B to C. SO please, make our wish true!!! There are so many applications with which you can learn vocabulary from language A to B, but KVocTrain is the only application I found in which one can have more columns. I'm sure there are so many people looking for this feature (especially people learning languages like Chinese, Korean, Vietnamese, Japanese (me), ... (because of the different "writing styles", Kanji, Hiragana, Romaji... and so on).
Comment 7 Eike Welk 2007-05-20 22:33:54 UTC
I want to second this whish. 

I see no positive effect (guidance) that the notion of 'original language' gives. It only makes the program less versatile.
You should at least allow the user to change the 'original language'.

Regards Eike.

Comment 8 Frederik Gladhorn 2007-08-28 21:00:57 UTC
Good and bad news. Since we completely redesigned the file format this will 
actually be implemented. The bad news is that this will probably not be 
before kde 4.1.
Comment 9 Frederik Gladhorn 2007-09-09 20:55:04 UTC
SVN commit 710363 by gladhorn:

Reimplementation of the start query menus as a simple dialog.
The dialog lets one choose the type of test and which languages.
Arbitrary languages are allowed.
Statistics should be kept. Only editing the statistics in Parley is not supported yet.
FEATURE: 93446 


 M  +2 -2      kvoctrain.cpp  
 M  +57 -1     query-dialogs/startpracticewidget.cpp  


--- trunk/KDE/kdeedu/parley/src/kvoctrain.cpp #710362:710363
@@ -755,14 +755,14 @@
     }
     startPracticeDialog->deleteLater();
 
-    m_queryManager->query(Prefs::EnumTestType::WrittenTest, Prefs::toIdentifier(), Prefs::fromIdentifier());
+    m_queryManager->query(Prefs::testType(), Prefs::toIdentifier(), Prefs::fromIdentifier());
 
 
 }
 
 void KVocTrainApp::resumePractice()
 {
-    m_queryManager->query(Prefs::EnumTestType::WrittenTest, Prefs::toIdentifier(), Prefs::fromIdentifier());
+    m_queryManager->query(Prefs::testType(), Prefs::toIdentifier(), Prefs::fromIdentifier());
 }
 
 
--- trunk/KDE/kdeedu/parley/src/query-dialogs/startpracticewidget.cpp #710362:710363
@@ -48,12 +48,68 @@
     LanguageFromList->setCurrentRow(Prefs::fromIdentifier());
 //     LanguageToList
 
+    switch ( Prefs::testType() ) {
+    case Prefs::EnumTestType::WrittenTest:
+        WrittenRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::MultipleChoiceTest:
+        MultipleChoiceRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::ArticleTest:
+        ArticlesRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::ConjugationTest:
+        ConjugationsRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::ComparisonAdjectiveTest:
+        ComparisonsRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::SynonymTest:
+        SynonymsRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::AntonymTest:
+        AntonymsRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::ExampleTest:
+        ExamplesRadio->setChecked(true);
+        break;
+    case Prefs::EnumTestType::ParaphraseTest:
+        ParaphraseRadio->setChecked(true);
+        break;
+    }
 }
 
 
 void StartPracticeWidget::commitData()
 {
-//     Prefs::setTestType();
+    if ( WrittenRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::WrittenTest);
+    }
+    if ( MultipleChoiceRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::MultipleChoiceTest);
+    }
+    if ( ArticlesRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::ArticleTest);
+    }
+    if ( ConjugationsRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::ConjugationTest);
+    }
+    if ( ComparisonsRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::ComparisonAdjectiveTest);
+    }
+    if ( SynonymsRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::SynonymTest);
+    }
+    if ( AntonymsRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::AntonymTest);
+    }
+    if ( ExamplesRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::ExampleTest);
+    }
+    if ( ParaphraseRadio->isChecked() ) {
+        Prefs::setTestType(Prefs::EnumTestType::ParaphraseTest);
+    }
+
     Prefs::setFromIdentifier(LanguageFromList->currentRow());
     Prefs::setToIdentifier(LanguageToList->currentItem()->data(Qt::UserRole).toInt());
 }
Comment 10 Frederik Gladhorn 2007-09-09 20:59:26 UTC
By the way, this means it's in KDE4.0 beta 3