Functions and Data Defintion in Decaleon 3.0
Decaleon allows a translation of a Sentence Grammar contained by XML Files from ten languages into Esperanto.
The name "Decaleon" means that you can speak in ten lanaguages (greek "deca"=ten, greek "leo"=say) to become a result in Esperanto.
"Decaleon" also is the name of a saint.
The Sentence Grammars are encoded in XML where each part of a Sentence has distinct attributs.
These XML Files need special Tag describing the Grammar of the Sentence.
The Vocabulary is also stored in an XML File where different parts of speech are distinguished.
This Word Data Base may be enlarged by the user.
The use of the program is very easy using the Grammar samples (Installation at the end of this document):
- Just load the XML Encoding of a Sentence Grammar
- Select the language from which to translate
- Press the Translate button
- May be select one of the Ambiguities of a word according to the Synonyms and Context Information, i.e. enter the number
- Watch the translation and error lines
Decaleon works for the following Languages using for each about 7875 words (names of the Sentence Grammar samples, xx = number):
- English : Grammar_eng_xx.xml
- French : Grammaire_fra_xx.xml
- German : Grammatik_ger_xx.xml
- Italian : Grammatica_ita_xx.xml
- Spanish : Gramatica_spa_xx.xml
- Portog. : Gramatica_por_xx.xml
- Danish : Grammar_dan_xx.xml
- Greek : Grammatike_gre_xx.xml
- Russian : Grammatika_rus_xx.xml
- Polish : Gramar_pol_xx.xml
Twelve Samples contain most of the implemented features (English/German):
- Sample 1: Simple sentence in the present with S-P-O, Singular and Adjective in the Positive Form
- Sample 2: Simple sentence in the Future with S-P-O, Plural and Adjective in Comparison
- Sample 3: Simple sentence in the present with S-P-O(3), more Objects in different Cases
- Sample 4: Simple sentence in the Imperfect with S(2)-P-O(4), double Subject, and more, as well multiple Objects, in different Cases
- Sample 5: Simple sentence in the Future with S-P-O, Passive
- Sample 6: Simple sentence in the Present with S-P-O, Adverbs in Positive Form at the Subject and at the Predikate
- Sample 7: Imperative sentence in the Present with P-O, Adverb in Comparison at the Predicate
- Sample 8: Multiple sentence in the Future each with S-P-O on equal level
- Sample 9: Multiple sentence in the Future with S-P-O/S-P and Adverb with regard to time
- Sample 10: Answering sentence in the Present with S-P(3), Particle and Predicate containing Auxiliary and double Verb
- Sample 11: Questioning sentence in the Present with S-P(2) with Predicate containing Auxiliary, Verb and Adverbe
- Sample 12: Simple sentence in the Present with S-P with Partcipial Completion at the Subject
- Sample 13: Multiple sentence in the Future/Past each with S-P-O, the second Part with relative pronoun
- Sample 14: Threefold Sentence in the Present with S-P/S-P(2)-O/S-P-O
Some useful advices to construct a new Sentence Grammar (for more detailed information see the following section):
- The Sentence Grammar follows the strict order Subject - Predicate - Object.
- Each of these Sentence Structures has special properties and may be additional elements such as Adjectives, Adverbs or Participes.
- A Subject and Object may be doubled, there may be more Objects in different cases in one sentence.
- Also the Predicate can consist of more than one element if there is an Auxiliary combined with a Verb in Infinitive.
- The sequence of the Sentence Structures, specially of the Objects, must be unambigous.
- Every Component has to be filled in the form you will find it in a dictionary,
e.g. Nouns in Nominative 1st Person Singular, Verbs in Infinitive, Adjectives in Positive Male Form etc.
- If the Subject is not a Noun or a Proper Name especially in the Roman languages no Pronoun would be needed usually.
But in this case you will have to fill the corresponding Pronoun into the Subject Tag.
- Edit your Sentence Grammar XML File with any Text Editor an XML Editor (care for well formed XML Files).
- Save your Sentence Grammar XML File in the Esperanto/bin/Debug directory.
To change Elements of the Grammar you can use the Tree View in the Edit Pane.
- Click on a Tree Node to edit its properties in the Editor on the lower right side.
- To use the implemented grammar features the Values of these Elements between the Tags must correspond to the Key Words listed in the second table.
- Save each edited Element using the Save Edit Button.
- Export the new Sentence Grammar using the Save XML Grammar Button in the Translation Pane.
The Grammar Key Words are described in detail at the end of this section. At first some general items concerning Sentence Grammar XML Files.
You can use one of the templates containing only the Tags (Template1.xml one Sentence, Template2.xml two Partial Sentences) and
- either fill in the text parts and the Options by using the Edit Pane of Decaleon,
- or edit the Sentence Grammar XML File using an (XML) Editor observing the following descriptions.
The Sentence Grammar XML File has to fulfill the XML conditions, so it beginns with the XML Declaration and (optional) Comments:
<?xml version="1.0">
<!--Esperanto: Grammar-->
<!--Esperanto: Sample 1: I wash up the new cup. = Mi lavas la novan tason.-->
<!--Esperanto: simple Sentence in the Present with S-P-O, Singular and Adjective im Positive Form-->
... and has to contain a Root Element (the XML Name Space may be altered):
<Esperanto xmlns:esp="http://www.esperanto.de">
...
</Esperanto>
Inside this Root Element a unique Tag contains the Original Sentence in the selected language:
(Note: Edit of this doesn't affect the translation, it only shows the whole Sentence.)
<Original>I wash up the new cup.</Original>
Each (Partial) Sentence (all the Structures and Elements explained below) is inside the Root Element and must be included in the following Tags:
<Sentence No="1">
...
</Sentence>
The following list gives an overview of the main Sentence Structures and where applicable the Options.
You a very variable using these Structures; here are the common cases:
- A usual Sentence has a Subject, a Predicate and no, one or more Objects (in different Cases).
- A Sentence may consist of only a Predicate (and Object). -> Imperative Form/Order
- A Sentence without Predicate is also possible. -> Ellipse
- You may have double Subjects, Objects and Predicates (within one Structure) combined by "and" or "or". -> Duplikat Tag
- An other case consists of two Predicates (two Structures) when using an Auxiliary and a usual Verb. -> PreGenusVerbi and PreSpezValenz Tags
- The Interpunctions are put at the end of each (Partial) Sentence.
- Junctions are only used in front of the second and following Partial Sentences.
- Particles are put in front of each (Partial) Sentence. -> Answering on a Decision (yes/no) or making an Exclamation (hurra)
No lets have a look at the Sentence Structures in detail (inclusive advices what to put between the Tags):
Subject
The Subject Structure contains at least a Pronoun, Noun, Proper Name or Relative Pronoun and optionally an Adjective, an Adverb and/or a Participe.
Each of these Elements has certain Properties, e.g. Number, Type, Comparison.
<Subjekt No="1">
<SubNominativ></SubNominativ> insert a Pronoun, Noun, Proper Name or Relative Pronoun (fill in the following 4 elements)
<SubType></SubType> choose Pronomen, Nomen, Name or Relativpron
<SubGenus></SubGenus> chose Option m(male), f(female), n(neuter) or 0(undetermined)
<SubNumerus></SubNumerus> choose Option 1(singular) or 2(plural)
<SubArtikel></SubArtikel> choose Option 0(no article) or 1(with article)
<SubAdjektiv></SubAdjektiv> insert an Adjective (fill in the following 2 elements)
<SubAdjType></SubAdjType> choose Option Normal or Possesiv
<SubAdjKomp></SubAdjKomp> choose Option Positiv(original), Komparativ(1st comparison) or Superlativ(2nd comparison)
<SubAdverb></SubAdverb> insert an Adverb or Adjective (fill in the following 2 elements)
<SubAdvType></SubAdvType> choose Option Original(for Adverb given) or Derivat(for Adjective given)
<SubAdvKomp></SubAdvKomp> choose Option Positiv(original), Komparativ(1st comparison) or Superlativ(2nd comparison)
<SubPartizip></SubPartizip> insert a Verb from which to build a Participe (fill in the following 3 elements)
<SubParTemp></SubParTemp> choose Option Praesens(present), Praeteritum(past) or Futur(future)
<SubParMod></SubParMod> choose Option Indikativ or Konjunktiv
<SubParGenV></SubParGenV> choose Option Aktiv or Passiv
<SubDuplikat></SubDuplikat> insert nothing, (in the selected language) or (in the selected language)
</Subjekt>
Predicate
The Subject Structure contains at least a Verb (general or Auxiliary) and optionally an Adverb.
Each of these Elements has certain Properties, e.g. Number, Person, Time, Type, Comparison.
<Preadikat No="1">
<PreInfinitiv></PreInfinitiv> insert a Verb (fill in the following 6 elements)
<PrePerson></PrePerson> choose Option 1(1st person), 2(2nd) person or 3(3rd person)
<PreNumerus></PreNumerus> choose Option 1(singular) or 2(plural)
<PreTempus></PreTempus> choose Option Praesens(present), Praeteritum(past) or Futur(future)
<PreModus></PreModus> choose Option Indikativ, Konjunktiv or Imperativ
<PreGenusVerbi></PreGenusVerbi> choose Aktiv, Passiv or Auxiliarcomes(Auxiliary Companion)
<PreSpezValenz></PreSpezValenz> choose Intransitiv(no Object Complete), Transitiv(with Object Complete), Reflexiv(Reflexive Form) or Auxiliarum(Auxiliary i.e. can, should, must)
<PreAdverb></PreAdverb> insert an Adverb or Adjective (fill in the following 2 elements)
<PreAdvType></PreAdvType> choose Option Original(for Adverb given) or Derivat(for Adjective given)
<PreAdvKomp></PreAdvKomp> choose Option Positiv(original), Komparativ(1st comparison) or Superlativ(2nd comparison)
<PreDuplikat></PreDuplikat> choose Option Original(for Adverb given) or Derivat(for Adjective given)
</Preadikat>
Object
The Object Structure contains at least a Pronoun, Noun, Proper Name or Relative Pronoun and optionally an Adjective, an Adverb and/or a Participe.
Each of these Elements has certain Properties, e.g. Number, Case, Type, Comparison.
<Objekt No="1">
<ObjNominativ></ObjNominativ> insert a Pronoun, Noun, Proper Name or Relative Pronoun (fill in the following 5 elements)
<ObjType></ObjType> choose Option Pronomen, Nomen, Name or Relativpron
<ObjKasus></ObjKasus>
<ObjGenus></ObjGenus> chose Option m(male), f(female), n(neuter) or 0(undetermined)
<ObjNumerus></ObjNumerus> choose Option 1(singular) or 2(plural)
<ObjArtikel></ObjArtikel> choose Option 0(no article) or 1(with article)
<ObjAdjektiv></ObjAdjektiv> insert an Adjective (fill in the following 2 elements)
<ObjAdjType></ObjAdjType> choose Option Normal or Possesiv
<ObjAdjKomp></ObjAdjKomp> choose Option Positiv(original), Komparativ(1st comparison) or Superlativ(2nd comparison)
<ObjAdverb></ObjAdverb> insert an Adverb or Adjective (fill in the following 2 elements)
<ObjAdvType></ObjAdvType> choose Option Original(for Adverb given) or Derivat(for Adjective given)
<ObjAdvKomp></ObjAdvKomp> choose Option Positiv(original), Komparativ(1st comparison) or Superlativ(2nd comparison)
<ObjPartizip></ObjPartizip> insert a Verb from which to build a Participe (fill in the following 3 elements)
<ObjParTemp></ObjParTemp> choose Option Praesens(present), Praeteritum(past) or Futur(future)
<ObjParMod></ObjParMod> choose Option Indikativ or Konjunktiv
<ObjParGenV></ObjParGenV> choose Option Aktiv or Passiv
<ObjPraeposition></ObjPraeposition> insert a Preposition
<ObjDuplikat></ObjDuplikat> insert nothing, (in the selected language) or (in the selected language)
</Objekt>
Interpunction
<Interpunktion No="1">
<IntText></IntText> insert a Punctuation Mark(./!/?/,)
<IntType></IntType> choose Option Deklarativ(statement), Imperativ(order), Interrogativ(question) or Partitiv(Partial Sentence)
</Interpunktion>
Junction
<Junktion No="1">
<JunText></JunText> insert a Junction e.g. , , (in the selected language)
<JunType></JunType> choose Option Konjunktion(equal level Sentence) or Subjunktion(sub level Sentence)
</Junktion>
Particle
<Partikel No="1">
<ParText></ParText> insert or (in the selected language) or an exclamation term
<ParType></ParType> choose Option Decision(answering) or Interjektion(exclamation)
</Partikel>
If there are unknown words you may add unknown words to the XML Vocabulary "Vocabulary.xml" in the Esperanto/bin/Debug directory.
Keep in mind to save this File coded as UTF-8/Unicode to maintain the Special Characters.
Put the words in order of the 8 parts of speech which are distinguished (Tag names):
- Pronouns: Pronomen
- Nouns: Nomen
- Verbs: Verb
- Adjectives: Adverb
- Adverbs: Adjektiv
- Prepositions: Praeposition
- Particles: Partikel
- Junctions: Junktion
Each word is described by fourteen Tags (xxx = first three characters of part of speech):
- xxxGer: German
- xxxEsp: Esperanto
- xxxEng: English
- xxxFra: French
- xxxSpa: Spanish
- xxxIta: Italian
- xxxPor: Portoguesian
- xxxDan: Danish
- xxxGre: Greek
- xxxRus: Russian
- xxxPol: Polish
- xxxSyn: Synonyms
- xxxKon: Context
- xxxAny: Other Language
The Synonym and Context Information helps to choose the right word in case of Ambiguities, i.e. words with the same spelling but different meaning.
These Ambiguities occur at different words in the different languages; so this Information is listed as an extra attribute.
The Synonym and Context Information is given only in English.
An example where there is no difference in English, French and Italian is the word "eat / manger / mangiare".
It is used as well for human beeings as for animals. In German, Spanish and Esperanto there are two different words for these different meanings.
So the Contex Information gives "human" for the first case and "animal" for the second case.
The ninth encoding "Any" allows to use any other language. Just fill in the words accoding to the Synonym/Context Information.
As a sample the Bavarian dialect of German is given in file "Grammatik_BY_1.xml".
Special Characters of Esperanto are prescribed by a | before the standard Character, e.g. (each in lower and upper case):
- |c |C
- |g |G
- |h |H
- |j |J
- |s |S
- |u |U
The display functions show these Special Characters correctly if you install the Fonts mentioned in the Installation Description above.
Using the Any-to-Any Dictionary you can enter the Esperanto words/terms typing in the Special Characters in the mentioned way.
So Esperanto can be typed in with any Keyboard.
Note: Special Characters of the Languages like
- the German "Umlaute"
- the French ligatures "e dans l'o" and "e dans l'a"
- the Greek Alphabet
- the Russian Cyrillic Alphabet
are saved as UTF-8/Unicode Characters in the Vocabulary (new in Version 3.0).
So the specific Languages can be typed in with the Language-conforme Keyboard or by using the Application "Unicode Typewriter" contained.
Each word has three Attributes:
- Nr: The upcounting Number (in each Part of Speech).
- Nv: The Niveau for Learning (see Trainer).
- Th: The logical Theme (see File "Sprachen_Themen.txt").
Decaleon includes an Any-To-Any Dictionary between 10 Languages, "Any Language" and Esperanto.
Just open the Dictionary Form via the rightmost upper Button in the Translation Pane.
The upper Pane of the Dictionary Window allows a Word Search.
At first select the Language for which you will enter the Search String, then select the Language to translate to.
Enter the Search String and press the "Search" Button.
The big Text Field shows you the Result Entries of the Search followed by
the original String found, the optional Context and Synomym Information.
The Radio Buttons for the Search Mode let you do either a "strict" Search
where the Word(s) you enter is/are compared to the complete Entry,
or a "Starts with" Search where the Word(s) is/are part of the Entry at the Beginning
but at least three letters are needed.
The lower Pane of the Dictionary Window allows Generation of a Vocabulary List.
At first select the "from Language" and then the "to Language".
The Radio Buttons for Selection Criterion let you select the Words either by Learning Niveau (A1/A2/B1/B2)
or by 25 logic Themes (for details see File "Sprachen_Themen.txt"):
- (01) Nations/Languages
- (02) Human Body/Senses
- (03) Health/Medicine
- (04) Psychology/Brain/Behaviour
- (05) Food/Clothing
- (06) Home/Househould
- (07) Family/Private Life
- (08) Education/Training
- (09) Occupation/Tools
- (10) Leisure/Sports/Events
- (11) Travelling/Gastronomy
- (12) Traffic/Transportation
- (13) State/Law/Society
- (14) Economy/Financial World
- (15) Communication/Media
- (16) Art/Music/Literature
- (17) History/Religion/Philosophy
- (18) Earth/Nature/Biology
- (19) Natural Sciences/Technique
- (20) Space/Time
- (21) Colors/Forms
- (22) Quantity/Numbers/Units
- (23) Properties/Modalities
- (24) Speech/Grammar
- (25) Functional Words
Finally press the "List" Button to generate the HTML File containing your selected Words,
which was saved into the /Debug/bin Directory.
Decaleon includes an Any-To-Any Vocabulary Trainer between 2 of 10 Languages, "Any Language" and Esperanto.
Creating a Training File
Just open the Trainer Form via the rightmost lower Button in the Translation Pane.
Enter the Name (without Extension) of the Training File to save your Training Wordlist including Results.
At first select "New Choice", one or more Niveaus, the Language for which a Word will be given (from Language),
then the Language for which Alternatives will be given to choice from (to Language).
Press the "Apply" Button. A MessageBox says how many Words of the given Niveau and Languages were selected.
The selected Words get mixed (the parts of speech are mixed and not in alphabetical order).
The "Results" GroupBox shows how many Words were selected, trained at least once and what Score you have.
Clicking the orange Score Label lets you view all selected Words including the current Score Information.
Starting a new Training Session
To Start a Training Session press the "Start Training" Button. The right side of the Window gets activated.
At the beginning only the Option "New Words" is active (later also "Known Words" lets you train underaverage scored Words).
Select the Number of Words to take for the coming Learning Unit and the Number of Repetitions for each Word in it.
Press the "Start Unit" Button. The first Learning Unit is activated.
Additional Information on alternative Auto-Unit: Checking the Option "Auto" (CheckBox) you can start a Automatic Unit,
i.e. only reading, guessing and reading the answer. You don't have to click and can just concentrate on the Words.
You have 5 Seconds to guess the right answer and after the right Alternative got green another 5 Seconds to memorize.
The maximum Score to gain is about 20 Percent less than in an "active" Unit.
Carrying out a Learning Unit
Pressing the "Go on" Button shows the first/next Word of this Learning Unit.
The TextLabels under this Button show the current Repetitions, Score and last Training Date/Time of the current Word.
The yellow TextBox on the right gives Information on Thematic Information, Word Type and if necessary on Context and/or Synonyms.
The yellow TextLabel shows the current Word in the "from Language", the five blue TextLabels give Alternatives in the "to Language".
Click into the right Alternative blue TextLabel.
If the Choice was right, it gets green; if the Choice was wrong, it gets red and the right Alternative gets green.
Sometimes two identical Alternatives may occur or the Word Info may not give enough Information; then you have the possibility
to score the last Word as right using the "right" Button. Also Reaction Time of your Choice is measured.
Press again the "Go on" Button for the next current Word and continue to the end of the Learning Unit.
When the Learning Unit is finished, a Window shows the Mean Score and all Words of the Learning Unit including Score Information.
After closing the Score Window make the Selections for a new Training Unit (Mixed Mode lets you train a Combination of New Words and Known Words).
Then start a new Learning Unit.
If you need a Pause during a Learning Unit press the yellow "From Word" TextLabel to have a break and press it again to continue.
Saving and Loading a Training File
To save your Results press the Save "Button" on the bottom of the left side (Closing by Window "x" also saves).
When starting the Trainer again you just will have to choice your Training File and a new Training Session can begin.
Remarks
The Niveaus are similar to the European Reference: A1 (basic Vocabulary), A2 (essential Vocabulary), B1 (extended Vocabulary), B2 (comprehensive Vocabulary).
Decaleon contains the nearly complete Niveaus A1, A2 and B1, and some Words of B2.
The Vocabulary Trainer was the recent Development of Decaleon, so if there are Problems report it to gearwheelsoft2@hotmail.com.
Sentence Structures
The numbers of the Sentence Strutures are restricted in the source code. The maximum numbers of Sentence Structures are:
- partial Sentences: 3
- Subjects: 9
- Predicates: 9
- Objects: 30
- Junctions: 3
- Particles: 3
- Punctuation Marks: 3
The numbers in the second column are the maximum possible numbers of each Structure. You may change these numbers in the Globals.vb file.
Vocabulary parts of speech
The numbers of the Parts of Speech are restricted in the source code. There are no longer maximum numbers of Parts of Speech in Version 3.0,
because the internal Structures were changed to Lists of Classes.
When selecting your Language, a Message Box says how many Words are contained in this Language (maximum given below).
- Pronouns: 64
- Nouns: 4257
- Verbs: 1638
- Adjectives: 1358
- Adverbs: 448
- Prepositions: 23
- Particles: 25
- Junctions: 64
The numbers in the second column are the maximum possible numbers of each Parts of Speech. You may change these numbers in the Globals.vb file.
This table gives an overview of the programmed Grammacal Endings of Esperanto:
Itmes | Constants | Explanation | Key Word |
Nouns | | | |
| pubEspNoArticle = "" | no Article | 0 |
| pubEspArticle = "la" | with Article | 1 |
| pubEspSingular = "" | Singular - no sign | 1 |
| pubEspPlural = "j" | Plural sign | 2 |
Cases | | | |
| pubEspNominative = "" | Nominative - no sign | 1 |
| pubEspGenitive = "de" | Genitive sign | 2 |
| pubEspDative = "al" | Dative sign | 3 |
| pubEspAccusative = "n" | Accusative sign | 4 |
Verbs: Indicative | | | Indikativ |
| pubEspIndPresent = "as" | Present Ending | Praesens |
| pubEspIndPraeteritum = "is" | Imperfect Ending | Praeteritum |
| pubEspIndFutur = "os" | Future Ending | Futur |
Verbs: Conjunctive | | | Konjunktiv |
| pubEspKonPresent = "us" | Present Ending | Praesens |
| pubEspKonPraeteritum = "us" | Imperfect Ending | Praeteritum |
| pubEspKonFutur = "us" | Future Ending | Futur |
Verbs: Imperative | | | Imperativ |
| pubEspImpImperative = "u" | Imperative Ending | |
Verbs: Participe Active | | | Aktiv |
| pubEspParAktiPresent = "anta" | Present Ending | Praesens |
| pubEspParAktiPraeteritum = "inta" | Imperfect Ending | Praeteritum |
| pubEspParAktiFutur = "onta" | Future Ending | Futur |
Verbs: Participe Passive | | | Passiv |
| pubEspParPassPresent = "ata" | Present Ending | Praesens |
| pubEspParPassPraeteritum = "ita" | Imperfect Ending | Praeteritum |
| pubEspParPassFutur = "ota" | Future Ending | Futur |
Adjectives | | | |
| pubEspAdjPositive = "" | original form - no sign | Positiv |
| pubEspAdjKomparative = "pli" | 1. Comparison sign | Komparativ |
| pubEspAdjSuperlative = "plej" | 2. Comparison sign | Superlativ |
Adverbs | | | |
| strEspAdvOriginal = "" | original Adverb | Original |
| strEspAdvDerivat = "e" | dervivated Adverb | Derivat |
| pubEspAdvPositive = "" | original form - no sign | Positiv |
| pubEspAdvKomparative = "pli" | 1. Comparison sign | Komparativ |
| pubEspAdvSuperlative = "plej" | 2. Comparison sign | Superlativ |
Requesites
- Maybe download the .NET-Framework from MicroSoft (Redistributable Package)
Installation
- Extract the Fonts *.TTF (ORION) to C:\Windows\Fonts
- Extract the Project ZIP file to a new folder
Start
- Open the VB.NET Project with MS Visual Basic 2008 (Express Edition) or start the EXE file in the Esperanto/bin/Debug directory
State: Beta Version 3.0 / Sep 2012 by gearwheelsoft