[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    [Kde-edu-devel] Re: [kde-edu]: FlashKard v0.1
From:       Ewald Arnold <ewald () ewald-arnold ! de>
Date:       2001-10-15 19:10:47
[Download RAW message or body]

Hi all,

> Well, to get a better idea of what kvml can really do, you'd be best asking
> Ewald Arnold, I'm just using a small subset of it, but I thought it would
> be nice to try to use a common format.
>
> Here's an example:
> ===
> <kvtml>
>  <e>
>   <o>Also, los!</o>
>   <t>so, let's go!</t>
>  </e>
>  <e>
>   <o>Sie</o>
>   <t>you (formal)</t>
>  </e>
>  <e>
>   <o>andere</o>
>   <t>other, another (plural)</t>
>  </e>
>  <e>
> </kvtml>
> ===
> <e> is entry, <o> is original and <t> is translation.  That's pretty much
> all that FlashKard currently uses.

As Scott already mentioned, the above example is just the most simple form of 
a vocabulary file you can describe with kvtml. 

The above "you (formal)" would be better described by two internal parts:

  the word "you" + property "usage label: formal"

I have created a quich-n-dirty description based on a more complicated sample 
file in german and english some time ago. Since it uses rather long lines I 
just attached it as email apps might break the lines and make it unreadable.

The files are also in cvs under kvoctrain/docs.

In case there is more interest and someone likes to help code on kvoctrain or 
to create a "vocabulary and words" related shared library for the kde-edu 
project based on this I would of course provide more information.

Ewald

-- 
Ewald Arnold, Germany
http://www.ewald-arnold.de/
mailto:ewald at ewald-arnold.de
mobil/sms:0162-8001240

["kvtml-structure.txt" (text/xml)]

<?xml version="1.0"?>
<!doctype kvtml system "kvoctrain.dtd">
<!--
This is a machine generated file.
Be careful when editing here.

Short definition:   <!--  The level of indentation shows the relation: right is \
"owned" by left -->  <!-- attributes are preceeded by %  ->

lesson       lesson group
 desc        name
   %no       its index
   %current  is current lesson
type         type group
 desc        name
   %no       its index
e            expression of dictionary
  %s         is selected
  %m         lesson member
  %t         common expression type
 o           original
   %q        in query ("o" is given, "t" is wanted)
   %l        language code
   %r        remark
   %p        pronunciation
   %width    column width
   %t        expression type (see QueryManager.h)
   %tf       false friend from
   %ff       false friend to
   %a        antonym
   %y        synonym
   %x        example
   %u        usage label
   %h        paraphrase
 t           translation ..
   %q        in query ("t" is given, "o" is wanted)
   %l        language code
   %r        remark
   %p        pronunciation
   %width    column width
   %t        expression type
   %tf       false friend from
   %ff       false friend to
   %a        antonym
   %y        synonym
   %x        example
   %u        usage label
   %h        paraphrase

   %d        last query date (from;to)
   %w        dito, compressed
   %g        grade (from;to)
   %c        count (from;to)
   %b        bad count (from;to)


Valid xml means:
 - Close all tags
 - Keep proper hierarchy
 - All attributes are quoted

--
> 
<kvtml
  encoding="8Bit"                                           <!-- Encoding (starting \
from here)  8Bit orTF8     -->  generator="kvoctrain v0.7.0pre3"                      \
<!-- just in case                            -->  cols="3"                            \
<!-- as well: just in case                   -->  lines="3"                           \
<!-- just for progressbar on startup         -->  title="Beispieldatei: Deutsch - \
Englisch/Französisch"     <!-- 4 self explaining lines ;-)             -->  \
author="Ewald Arnold"  license="OpenContent"
  remark="Beispieldatei mit allen Eigenschaften">

 <lesson width="104">                                       <!-- block with lesson \
names, width designates the last width of the leftmiost column -->  <desc \
no="1">Lektion eins</desc>  <desc no="2">Lektion zwei</desc>
  <desc no="3">Lektion drei</desc>
  <desc no="4">Lektion vier</desc>
 </lesson>

 <article>                                                  <!-- Define all the \
articles of the languages -->  <e l="de">                                             \
<!-- definete and indefinite atricle          -->  <fd>die</fd>                       \
<!-- use iso codes for languge reference      -->  <fi>eine</fi>
   <md>der</md>
   <mi>einer</mi>
   <nd>das</nd>
   <ni>ein</ni>
  </e>
  <e l="en">
   <fd>fd en</fd>
   <fi>fi en</fi>
   <md>md en</md>
   <mi>mi en</mi>
   <nd>nd en</nd>
   <ni>ni en</ni>
  </e>
  <e l="fr">
   <fd>la</fd>
   <fi>une</fi>
   <md>le</md>
   <mi>un</mi>
  </e>
 </article>

 <conjugation>                   <!-- Prefix for conjugations      -->
  <e l="de">                     <!-- all languages must be listed -->
   <s1>ich</s1>                  <!-- same order as above          -->
   <s2>du</s2>
   <s3f>sie</s3f>
   <s3m>er</s3m>
   <s3n>es</s3n>
   <p1>wir</p1>
   <p2>ihr</p2>
   <p3f common="1">sie</p3f>     <!-- third person is the same for all -->
   <p3m>sie</p3m>
   <p3n>sie</p3n>
  </e>
  <e l="en">
   <s1>I</s1>
   <s2>you</s2>
   <s3f>he</s3f>
   <s3m>she</s3m>
   <s3n>it</s3n>
   <p1>we</p1>
   <p2>you</p2>
   <p3f common="1">they</p3f>
  </e>
  <e l="fr">
   <s1>je</s1>
   <s2>tu</s2>
   <s3f>elle</s3f>
   <s3m>il</s3m>
   <p1>nous</p1>
   <p2>vous</p2>
   <p3f>elles</p3f>
   <p3m>ils</p3m>
  </e>
 </conjugation>

 <options>                                  <!-- document related options, e.g. don't \
sort -->  <sort on="1"/>
 </options>

 <type>                                     <!-- user defined word types -->
  <desc no="1">Mein Typ 1</desc>
  <desc no="2">Mein Typ 2</desc>
  <desc no="3">Mein Typ 3</desc>
 </type>

 <tense>                                    <!-- user defined tenses -->
  <desc no="1">Benutzer-Konjugation 1</desc>
 </tense>

 <usage>                                    <!-- user defined usage labels -->
  <desc no="1">Benutzersprachebene 1</desc>
 </usage>

 <e
     m="3"    <!-- lesson index 3, name see above -->
     s="1"    <!-- selected from last query (not yet queried) -->
     t="v">   <!-- type of word: here verb-->

     <o width="208"           <!-- original expression, width of column when last \
saved  -->  l="de"                  <!-- language code de: german     -->
      charset="ISO 8859-1"    <!-- charset needed for correct displaing  -->
      y="laufen">             <!-- synonyms, seperated by commas currently  -->
      
  <conjugation                      <!-- list the conjugations for the current verb  \
-->

  >                     
   <t n="PrSi">                     <!-- internal tense: simple present     -->
      <s1>gehe</s1>                 <!-- I, you, he, she ...               -->
      <s2>gehst</s2>
      <s3f common="1">geht</s3f>    <!-- he, she, it the same              -->
      <p1>gehen</p1>
      <p2>gehen</p2>
      <p3f common="1">gehen</p3f></t>
   <t n="PaSi"><s1>schwamm</s1><s2>schwammst</s2></t>
  </conjugation>
  gehen</o>                         <!-- the base word         -->



    <t                              <!-- first translation     -->
      width="208"
      l="en"                        <!-- lang code             -->
      g="1;2"                       <!-- current grade #from# original ; #to# \
                original. 0=not queried, 1..7 (7 is best)) -->
      c="2;0"                       <!-- number of queries so far (from/to the \
                original)   -->
      b="1;0"                       <!-- number of wrong answers (from/to)   -->
      d="12312;123123"              <!-- last query date (from/to) using \
                time()-function   -->
      ff="falscher Freund"          <!-- false friend (from original)   -->
      tf="Freund falscher">         <!-- false friend (to original)   -->
      
   <conjugation
   >
    <t n="PaSi"><s1>went</s1></t>
    <t n="PaPa"><s1>have gone</s1></t>
   </conjugation>
   go</t>
   
     <t width="208"                       <!-- second translation             -->
        l="fr"                            <!-- french                         -->
        charset="Unicode"                 <!-- encoding in unicode            -->
   >aller</t></e>                         <!-- end of this record             -->

 <e m="4"                                 <!-- language code may be omitted from \
second line on -->  s="1"
    t="aj">                               <!-- word type: adjectiv           -->

    <o r="unregelmässiges Adjektiv"       <!-- user defined comment           -->
       a="schlecht">                      <!-- antonym of this word           -->

  <comparison>                            <!-- block with comparison forms for this \
word -->  <l1>gut</l1>
   <l2>besser</l2>
   <l3>am besten</l3>
  </comparison>
  gut</o><t>                              <!-- first translation -->
   <comparison>
    <l1>good</l1><l2>better</l2><l3>best</l3>
   </comparison>
   good</t><t>                            <!-- second translation -->
    <comparison>
     <l1>bon</l1><l2>meilleur</l2><l3>le meilleur</l3>
    </comparison>
    bon</t></e>
 <e m="2" t="n">
    <o y="Fußgelenk"                    <!-- synonyms                       -->
     u="anat"                           <!-- usage label, internal code for "anatomy" \
-->  >Knöchel</o>

     <t p="nackls">                     <!-- pronunciation according to your personal \
                taste. With unicode you may
                                             as well use the phonetic alphabet        \
-->  knuckles</t><t g="2;3" c="1;1" b="1;1">cheville</t></e>
</kvtml>


<!--

  Some additional comments:

  All properties are intended to be shared with other users, even between totally \
different  languages and encodings.

  The document always uses placeholders which are used to display "real" names \
according  to the users language. E.g. "v" means "Verb" whereas "n" means noun which \
can be extended  by a subtyp to "noun, female" by writing a placeholder "n:f".

  The same applies to usage labels. Here you may concatenate an arbitrary number of \
usage  labels with a comma:  u="anat,biol"  will result in "Anatomy, Biology"

  User defined properties always start with "#" and a number (internal properties \
always start  with a letter). e.g. t="#1" references the first entry in the user \
defined tenses.  Of course one can't provide automatic translation of the user \
defined properties this way.

-->
  


["kvtml-aufbau.txt" (text/xml)]

<?xml version="1.0"?>
<!doctype kvtml system "kvoctrain.dtd">
<!--
This is a machine generated file.
Be careful when editing here.

Short definition:

lesson       lesson group
 desc        name
   %no       its index
   %current  is current lesson
type         type group
 desc        name
   %no       its index
e            entry of dictionary
  %s         is selected
  %m         lesson member
  %t         common expression type
 o           original
   %q        in query ("o" is given, "t" is wanted)
   %l        language code
   %r        remark
   %p        pronunciation
   %width    column width
   %t        expression type (see QueryManager.h)
   %tf       false friend from
   %ff       false friend to
   %a        antonym
   %y        synonym
   %x        example
   %u        usage label
   %h        paraphrase
 t           translation ..
   %q        in query ("t" is given, "o" is wanted)
   %l        language code
   %r        remark
   %p        pronunciation
   %width    column width
   %t        expression type
   %tf       false friend from
   %ff       false friend to
   %a        antonym
   %y        synonym
   %x        example
   %u        usage label
   %h        paraphrase

   %d        last query date (from;to)
   %w        dito, compressed
   %g        grade (from;to)
   %c        count (from;to)
   %b        bad count (from;to)


Valid xml means:
 - Close all tags
 - Keep proper hierarchy
 - All attributes are quoted

--
> 
<kvtml
  encoding="8Bit"                                           <!-- Kodierung (ab hier)  \
8Bit oder UTF8     -->  generator="kvoctrain v0.7.0pre3"                          \
<!-- für alle Fälle                          -->  cols="3"                            \
<!-- ebenfalls Reserve                       -->  lines="3"                           \
<!-- nur für Fortschrittsbalken zu Beginn    -->  title="Beispieldatei: Deutsch - \
Englisch/Französisch"     <!-- 4 selbsterklärende Zeilen ;-)           -->  \
author="Ewald Arnold"  license="OpenContent"
  remark="Beispieldatei mit allen Eigenschaften">

 <lesson width="104">                                       <!-- Block mit Lektionen, \
width ist die zuletzt eingestellte Breite der Spalte -->  <desc no="1">Lektion \
eins</desc>  <desc no="2">Lektion zwei</desc>
  <desc no="3">Lektion drei</desc>
  <desc no="4">Lektion vier</desc>
 </lesson>

 <article>                                                  <!-- Definition mit den \
Artikeln je Sprache -->  <e l="de">                                                \
<!-- bestimmter und unbestimmter Artikel    -->  <fd>die</fd>
   <fi>eine</fi>
   <md>der</md>
   <mi>einer</mi>
   <nd>das</nd>
   <ni>ein</ni>
  </e>
  <e l="en">
   <fd>fd en</fd>
   <fi>fi en</fi>
   <md>md en</md>
   <mi>mi en</mi>
   <nd>nd en</nd>
   <ni>ni en</ni>
  </e>
  <e l="fr">
   <fd>la</fd>
   <fi>une</fi>
   <md>le</md>
   <mi>un</mi>
  </e>
 </article>

 <conjugation>                   <!-- Präfixe für Konjugationen -->
  <e l="de">                     <!-- ebenfalls für alle Sprachen -->
   <s1>ich</s1>                  <!-- wobei die Reihenfolge de-en-fr gleich sein muss \
wie vorher -->  <s2>du</s2>
   <s3f>sie</s3f>
   <s3m>er</s3m>
   <s3n>es</s3n>
   <p1>wir</p1>
   <p2>ihr</p2>
   <p3f common="1">sie</p3f>
   <p3m>sie</p3m>
   <p3n>sie</p3n>
  </e>
  <e l="en">
   <s1>I</s1>
   <s2>you</s2>
   <s3f>he</s3f>
   <s3m>she</s3m>
   <s3n>it</s3n>
   <p1>we</p1>
   <p2>you</p2>
   <p3f common="1">they</p3f>
  </e>
  <e l="fr">
   <s1>je</s1>
   <s2>tu</s2>
   <s3f>elle</s3f>
   <s3m>il</s3m>
   <p1>nous</p1>
   <p2>vous</p2>
   <p3f>elles</p3f>
   <p3m>ils</p3m>
  </e>
 </conjugation>

 <options>                                  <!-- Dokument-Optionen, z.B. nicht \
sortieren -->  <sort on="1"/>
 </options>

 <type>                                     <!-- eigene Worttypen -->
  <desc no="1">Mein Typ 1</desc>
  <desc no="2">Mein Typ 2</desc>
  <desc no="3">Mein Typ 3</desc>
 </type>

 <tense>                                    <!-- eigene Worttypen -->
  <desc no="1">Benutzer-Konjugation 1</desc>
 </tense>

 <usage>                                    <!-- eigene Sprachebenen -->
  <desc no="1">Benutzersprachebene 1</desc>
 </usage>

 <e
     m="3"    <!-- Lektionsindex 3, Name siehe oben -->
     s="1"    <!-- selektiert, Rest einer abgebrochenen Abfrage -->
     t="v">   <!-- Worttyp, Verb -->

     <o width="208"           <!-- Originalausdruck, zuletzt benutzte Spaltenbreite  \
-->  l="de"                  <!-- Sprache deutsch       -->
      charset="ISO 8859-1"    <!-- Zeichensatz, alle 8859-x, auch Unicode und \
                Japanisch, soweit eben von QT2/KDE2 unterstützt -->
      y="laufen">             <!-- Synonyme, derzeit durch Kommas notdürftig getrennt \
-->  
  <conjugation                      <!-- Konjugationen zum aktuellen Verb  -->
                                    <!-- angedacht: hier könnten weitere Attribute \
wie oben für  Noten, Abfrage usw. stehen -->

  >                     
   <t n="PrSi">                     <!-- Typ, Simple Present               -->
      <s1>gehe</s1>                 <!-- ich, du, er, ...                  -->
      <s2>gehst</s2>
      <s3f common="1">geht</s3f>    <!-- er, sie, es gemeinsam weil gleich -->
      <p1>gehen</p1>
      <p2>gehen</p2>
      <p3f common="1">gehen</p3f></t>
   <t n="PaSi"><s1>schwamm</s1><s2>schwammst</s2></t>
  </conjugation>
  gehen</o>                         <!-- eigentliche Vokabel   -->



    <t                              <!-- erste Fremdsprache    -->
      width="208"
      l="en"                        <!-- Sprachcode            -->
      g="1;2"                       <!-- Note für Richtung von/zum Original, 1..7 -->
      c="2;0"                       <!-- Anzahl Abfragen von/zum Original   -->
      b="1;0"                       <!-- davon falsche Abfragen von/zum Original   \
                -->
      w="AiHzA;AiHzA"               <!-- letztes Abfragedatum von/zum Original, hier \
                etwas "komprimiert", eigentlich aber time()-Funktion   -->
      ff="falscher Freund"          <!-- falscher Freund vom Original   -->
      tf="Freund falscher">         <!-- falscher Freund zum Original   -->
      
   <conjugation
                                    <!-- angedacht: hier könnten weitere Attribute \
wie oben für  Noten, Abfrage usw. stehen -->
   >
    <t n="PaSi"><s1>went</s1></t>
    <t n="PaPa"><s1>have gone</s1></t>
   </conjugation>
   go</t>
   
     <t width="208"                       <!-- zweite Fremdsprache            -->
        l="fr"                            <!-- Französisch                    -->
        charset="Unicode"                 <!-- Unicode kodiert                -->
   >aller</t></e>                         <!-- Ende dieses Datensatzes        -->

 <e m="4"
    s="1"
    t="aj">                               <!-- Typ Adjektiv                  -->

    <o r="unregelmässiges Adjektiv"       <!-- eigene Bemerkung               -->
       a="schlecht">                      <!-- Antonym dieser Vokabel         -->

  <comparison>                            <!-- Block mit Steigerungsformen    -->
   <l1>gut</l1>
   <l2>besser</l2>
   <l3>am besten</l3>
  </comparison>
  gut</o><t>
   <comparison>
    <l1>good</l1><l2>better</l2><l3>best</l3>
   </comparison>
   good</t><t>
    <comparison>
     <l1>bon</l1><l2>meilleur</l2><l3>le meilleur</l3>
    </comparison>
    bon</t></e>
 <e m="2" t="n">
    <o y="Fußgelenk"                    <!-- Synonyme                       -->
     u="anat"                           <!-- Sprachebene, Anatomie          -->
     >Knöchel</o>

     <t p="nackls">                     <!-- Aussprache, derzeit nach Geschmack, \
                später zusätzlich mit Unicode
                                             und den Zeichen aus dem Phonetischen \
Alphabet  -->  knuckles</t><t g="2;3" c="1;1" b="1;1">cheville</t></e>
</kvtml>


<!--

  noch einige Bemerkungen:

  Alle Eigenschaften sind darauf ausgelegt, mit anderen austauschbar zu sein,
  auch über Sprachgrenzen hinweg.

  Es wird immer über einen "Platzhalter" referenziert.
  Der Typ "Verb" z.B. mit "v", Hauptwörter zunächst mit "n", können
  aber mit "n:f" näher spezifiziert werden, in diesem Fall "Nomen,weiblich".

  u="anat" ist ebenfalls in allen Sprachen das selbe und wird nur für die Anzeige
  intern in "Anatomie" der "anatomy" umgesetzt. Bei den Benutzerebenen sind mehrere
  in Kombination möglich, jeweils durch Kommas getrennt.

  Benutzerdefinierte Eigenschaften beginnen immer mit einem "#" und einer darauf
  folgenden Nummer. Z.B. t="#1" =  benutzer-definierter Worttyp, mit dem Namen des \
ersten  Eintrages des entsprechenden Blockes. Mehrsprachigkeit ist hier nicht möglich \
und meist auch  nicht nötig, aber immerhin kann man die Blöcke im Programm oder einem \
Texteditor anpassen,  wenn Bedarf ist.

-->
  


_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic