Option Explicit On

' Translation of Sentences from Deutsch/English/Francais/Espanol/Italiano/Portogues/Dansk/Svenska/Ellenika/Russkij/Polski/Hrvatski to Esperanto
'
' Functions:
' - initVocabulary          Initialisierung der Datenfelder Vokabular
' - redimGrammar            Redimensionierung der Datenfelder Grammatik
' - initLanguages           Initialisierung der Sprachen-Namen
' - initThemes              Initialisierung der Themen-Bezeichnungen
' - initExtNames            Initialisierung der Extra Vokabular Namen
' - readVocabulary          Einlesen des Vokabulars
' - readCoocLink            Lesen der Link-Dateien fuer Kookkurrenzen
' - readGrammar             Einlesen der XML-Codierung eines Satzes
' - lookforExpr             Nachschlag im Vokabular
' - translateToEsperanto    Uebersetzung in Esperanto
' - printPretty             Aufbereiten mit je einem Leerzeichen und Darstellung Esperanto-spezifischer Buchstaben
' - formatPretty            Ausgabe-Formatierung fuer Integer-Zahlen
' - showGrammarAsTreeview   Anzeige der XML-Grammatik als TreeView
' - showNode                Anzeige einer TreeView-Komponente im Editierbereich
' - saveNode                Speichern der Aenderungen einer Komponente im Editierbereich
' - clearEdit               Loeschen der Anzeigen im Editierbereich
' - writeGrammar            Speichern der XML-Codierung eines Satzes
' - checkLanguage           Feststellung der Sprache durch Test auf Affixe
' - checkAffix              Test auf Affix am Wortanfang (Subroutine zu checkLanguage)
' - checkSuffix             Test auf Affix am Wortende (Subroutine zu checkLanguage)
' - indexOfMaxOfPositivVector Index des Maximums im Vektor (Subroutine zu checkLanguage)
' - lookForMultiples        Ermittlung von Mehrdeutigkeiten von Woertern in der Originalsprache
' - checkMultiples          Auswahl von eventuellen Mehrdeutigkeiten durch den Nutzer
' Data Structures:
' - Vocabulary              Vokabular
' - Grammar                 Grammatik eines Satzes (ggf. mit Teil-Saetzen)
' - GSentence               Verwaltung mehrerer Teil-Saetze
' - GSubject                Beschreibung des Subjekts und ihm zugeordneter Satzbestandteile
' - GPredicate              Beschreibung des Praedikats und ihm zugeordneter Satzbestandteile
' - GObject                 Beschreibung des Objekts und ihm zugeordneter Satzbestandteile
' - GJunction               Beschreibung von Junktionen
' - GParticle               Beschreibung von Partikeln
' - GInterpunction          Beschreibung von Satzzeichen
' keep in mind:
' - benoetigt zur korrekten Darstellung die True Type Font-Dateien fuer den Font Orion (eve-ttf.zip);
'   diese sind in das Verzeichnis C:\Windows\Fonts zu kopieren, bevor das Programm ausgefuehrt wird
' - die Grammatik-Begriffe in der XML-Codierung sind durchgehend in lateinischer Form
' - weder Subjekt (Imperativ-Satz), noch Praedikat (Ellipse), noch Objekt (einfacher Satz) sind zwingend;
' - Junktionen werden verwendet, um dem Teil-Satz eine bei- oder nebenordnende Funktion zu geben
' - Partikel erscheinen i.d.R. am Anfang eines Satzes; das darauffolgende Komma muss nicht codiert werden
' - Satzzeichen am Ende eines (Teil-)Satzes muessen codiert werden
'
' MP Jun / Nov 2009 Version 1.0
' - Basic Functionality
' - bilingual about 7800 Words
' MP Jan 2010 / Apr 2011 Version 2.0
' - five other Languages
' - TreeView of the XML-Grammar
' - Edit TreeView Components
' - Export of the XML-Grammar
' - Guess of Language
' - Ambiguities/Synonyms
' MP Nov 2011 / Dez 2013 Version 3.0
' - five other Languages
' - XML-File in UTF-8
' - Vocabulary internal as Lists
' - Any to Any Dictionary (Form)
' - Vocabulary Trainer
' MP Jan / Dez 2014 Version 4.0
' - two other Languages
' - additional about 4000 Words
' - 2900 Semantic Groups
' MP Feb / Dez 2015 Version 5.0
' - additional about 8500 Words
' - extra Technical Vocabulary
' - Expressions Output as List
' - Thematic Dictionary
' MP Mar / Dez 2016 Version 6.0
' - additional about 24000 Words
' - Import for AnyLanguage
' - Files for another 12 Languages
' MP Mai / Dez 2018 Version 6.0
' - additional about 12000 Words
' - Cooccurrences Database
' - Links for Cooccurrences


Imports System.Xml
Imports System.IO
Imports System.Text.RegularExpressions


Module TranslateEsperanto

    ' Data Structures

    ' Vocabulary
    Public countVocPronomen As Integer
    Public countVocNomen As Integer
    Public countVocVerb As Integer
    Public countVocAdjective As Integer
    Public countVocAdverb As Integer
    Public countVocPreposition As Integer
    Public countVocParticle As Integer
    Public countVocJunction As Integer
    Public countVocExpression As Integer
    Public countVocCooccurrence As Integer
    Public countVocGroup As Integer
    Public _isVocDone As Boolean
    Public pubVocThemes(26) As String
    Public pubVocSubThemes(256, 4) As String
    ' Extra Zaehler
    Public countVocBasPronomen As Integer
    Public countVocBasNomen As Integer
    Public countVocBasVerb As Integer
    Public countVocBasAdjective As Integer
    Public countVocBasAdverb As Integer
    Public countVocBasPreposition As Integer
    Public countVocBasParticle As Integer
    Public countVocBasJunction As Integer
    Public countVocBasExpression As Integer
    Public countVocBasCooccurrence As Integer
    Public countVocBasGroup As Integer

    Public Class clsVocabularyPro
        Public _NivPronomen As String
        Public _ThmPronomen As String
        Public _GrpPronomen As String
        Public _GerPronomen As String
        Public _EspPronomen As String
        Public _EngPronomen As String
        Public _FraPronomen As String
        Public _SpaPronomen As String
        Public _ItaPronomen As String
        Public _PorPronomen As String
        Public _DanPronomen As String
        Public _SwePronomen As String
        Public _GrePronomen As String
        Public _RusPronomen As String
        Public _PolPronomen As String
        Public _CroPronomen As String
        Public _SynPronomen As String
        Public _KonPronomen As String
        Public _AnyPronomen As String
        Public _CooPronomen As String
    End Class
    Public Class clsVocabularyNom
        Public _NivNomen As String
        Public _ThmNomen As String
        Public _GrpNomen As String
        Public _GerNomen As String
        Public _EspNomen As String
        Public _EngNomen As String
        Public _FraNomen As String
        Public _SpaNomen As String
        Public _ItaNomen As String
        Public _PorNomen As String
        Public _DanNomen As String
        Public _SweNomen As String
        Public _GreNomen As String
        Public _RusNomen As String
        Public _PolNomen As String
        Public _CroNomen As String
        Public _SynNomen As String
        Public _KonNomen As String
        Public _AnyNomen As String
        Public _CooNomen As String
    End Class
    Public Class clsVocabularyVer
        Public _NivVerb As String
        Public _ThmVerb As String
        Public _GrpVerb As String
        Public _GerVerb As String
        Public _EspVerb As String
        Public _EngVerb As String
        Public _FraVerb As String
        Public _SpaVerb As String
        Public _ItaVerb As String
        Public _PorVerb As String
        Public _DanVerb As String
        Public _SweVerb As String
        Public _GreVerb As String
        Public _RusVerb As String
        Public _PolVerb As String
        Public _CroVerb As String
        Public _SynVerb As String
        Public _KonVerb As String
        Public _AnyVerb As String
        Public _CooVerb As String
    End Class
    Public Class clsVocabularyAdj
        Public _NivAdjective As String
        Public _ThmAdjective As String
        Public _GrpAdjective As String
        Public _GerAdjective As String
        Public _EspAdjective As String
        Public _EngAdjective As String
        Public _FraAdjective As String
        Public _SpaAdjective As String
        Public _ItaAdjective As String
        Public _PorAdjective As String
        Public _DanAdjective As String
        Public _SweAdjective As String
        Public _GreAdjective As String
        Public _RusAdjective As String
        Public _PolAdjective As String
        Public _CroAdjective As String
        Public _SynAdjective As String
        Public _KonAdjective As String
        Public _AnyAdjective As String
        Public _CooAdjective As String
    End Class
    Public Class clsVocabularyAdv
        Public _NivAdverb As String
        Public _ThmAdverb As String
        Public _GrpAdverb As String
        Public _GerAdverb As String
        Public _EspAdverb As String
        Public _EngAdverb As String
        Public _FraAdverb As String
        Public _SpaAdverb As String
        Public _ItaAdverb As String
        Public _PorAdverb As String
        Public _DanAdverb As String
        Public _SweAdverb As String
        Public _GreAdverb As String
        Public _RusAdverb As String
        Public _PolAdverb As String
        Public _CroAdverb As String
        Public _SynAdverb As String
        Public _KonAdverb As String
        Public _AnyAdverb As String
        Public _CooAdverb As String
    End Class
    Public Class clsVocabularyPre
        Public _NivPreposition As String
        Public _ThmPreposition As String
        Public _GrpPreposition As String
        Public _GerPreposition As String
        Public _EspPreposition As String
        Public _EngPreposition As String
        Public _FraPreposition As String
        Public _SpaPreposition As String
        Public _ItaPreposition As String
        Public _PorPreposition As String
        Public _DanPreposition As String
        Public _SwePreposition As String
        Public _GrePreposition As String
        Public _RusPreposition As String
        Public _PolPreposition As String
        Public _CroPreposition As String
        Public _SynPreposition As String
        Public _KonPreposition As String
        Public _AnyPreposition As String
        Public _CooPreposition As String
    End Class
    Public Class clsVocabularyPar
        Public _NivParticle As String
        Public _ThmParticle As String
        Public _GrpParticle As String
        Public _GerParticle As String
        Public _EspParticle As String
        Public _EngParticle As String
        Public _FraParticle As String
        Public _SpaParticle As String
        Public _ItaParticle As String
        Public _PorParticle As String
        Public _DanParticle As String
        Public _SweParticle As String
        Public _GreParticle As String
        Public _RusParticle As String
        Public _PolParticle As String
        Public _CroParticle As String
        Public _SynParticle As String
        Public _KonParticle As String
        Public _AnyParticle As String
        Public _CooParticle As String
    End Class
    Public Class clsVocabularyJun
        Public _NivJunction As String
        Public _ThmJunction As String
        Public _GrpJunction As String
        Public _GerJunction As String
        Public _EspJunction As String
        Public _EngJunction As String
        Public _FraJunction As String
        Public _SpaJunction As String
        Public _ItaJunction As String
        Public _PorJunction As String
        Public _DanJunction As String
        Public _SweJunction As String
        Public _GreJunction As String
        Public _RusJunction As String
        Public _PolJunction As String
        Public _CroJunction As String
        Public _SynJunction As String
        Public _KonJunction As String
        Public _AnyJunction As String
        Public _CooJunction As String
    End Class
    Public Class clsVocabularyExp
        Public _NivExpression As String
        Public _ThmExpression As String
        Public _GrpExpression As String
        Public _GerExpression As String
        Public _EspExpression As String
        Public _EngExpression As String
        Public _FraExpression As String
        Public _SpaExpression As String
        Public _ItaExpression As String
        Public _PorExpression As String
        Public _DanExpression As String
        Public _SweExpression As String
        Public _GreExpression As String
        Public _RusExpression As String
        Public _PolExpression As String
        Public _CroExpression As String
        Public _SynExpression As String
        Public _KonExpression As String
        Public _AnyExpression As String
    End Class
    Public Class clsVocabularyCoo
        Public _NivCooccurrence As String
        Public _ThmCooccurrence As String
        Public _GrpCooccurrence As String
        Public _GerCooccurrence As String
        Public _EspCooccurrence As String
        Public _EngCooccurrence As String
        Public _FraCooccurrence As String
        Public _SpaCooccurrence As String
        Public _ItaCooccurrence As String
        Public _PorCooccurrence As String
        Public _DanCooccurrence As String
        Public _SweCooccurrence As String
        Public _GreCooccurrence As String
        Public _RusCooccurrence As String
        Public _PolCooccurrence As String
        Public _CroCooccurrence As String
        Public _SynCooccurrence As String
        Public _KonCooccurrence As String
        Public _AnyCooccurrence As String
    End Class

    ' Vocabulary List (Word Dictionary)
    ' Sorting by Field _wordListSort
    Public Class WordListElement : Implements IComparable
        Public _wordListFrom As String
        Public _wordListTo As String
        Public _wordListCon As String
        Public _wordListSyn As String
        Public _wordListType As String
        Public _wordListIndex As String
        Public _wordListText As String
        Public _wordListSort As String
        Private Class WordListElementSortingHelper : Implements IComparer
            Public Function Compare(ByVal a As Object, ByVal b As Object) As Integer Implements System.Collections.IComparer.Compare
                Dim c1 As WordListElement = CType(a, WordListElement)
                Dim c2 As WordListElement = CType(b, WordListElement)

                'If (c1._wordListSort > c2._wordListSort) Then
                '    Return 1
                'End If
                'If (c1._wordListSort < c2._wordListSort) Then
                '    Return -1
                'Else
                '    Return 0
                'End If

                Dim result As Integer = StringComparer.CurrentCulture.Compare(c1._wordListSort, c2._wordListSort)
                If (result = 0) Then result = StringComparer.Ordinal.Compare(c1._wordListSort, c2._wordListSort)
                Return result

            End Function
        End Class
        Function CompareTo(ByVal obj As Object) As Integer Implements IComparable.CompareTo
            Dim c As WordListElement = CType(obj, WordListElement)

            Return String.Compare(Me._wordListSort, c._wordListSort)
        End Function
        Public Shared Function sortYearAscending() As IComparer
            Return CType(New WordListElementSortingHelper(), IComparer)
        End Function
    End Class

    ' Semantic Groups
    Public Class clsVocabularyGrp
        Public _GrpNumber As String
        Public _GrpType As String
        Public _GrpName As String
        Public _GrpTheme As String
        Public _GrpLink As String
        Public _GrpMember(pubDimGroupMembers) As String
        Public _GrpAllTheme As String
        Public _GrpAllName(2) As String
    End Class

    ' Grammar (Sentence)
    Structure Grammar
        Dim _Original As String
        Dim countSentence As Integer
        Dim _Sentence() As GSentence
        Dim countSubject As Integer
        Dim _Subject() As GSubject
        Dim countPredicate As Integer
        Dim _Predicate() As GPredicate
        Dim countObject As Integer
        Dim _Object() As GObject
        Dim countJunction As Integer
        Dim _Junction() As GJunction
        Dim countParticle As Integer
        Dim _Particle() As GParticle
        Dim countInterpunct As Integer
        Dim _Interpunct() As GInterpunct
        Dim _Done As Boolean
    End Structure

    ' Teilsatz-Verwaltung
    Structure GSentence
        Dim _numSubjects As Integer
        Dim _numPredicates As Integer
        Dim _numObjects As Integer
        Dim _numJunctions As Integer
        Dim _numParticles As Integer
        Dim _numInterpuncts As Integer
        Dim _cumNumSubjects As Integer
        Dim _cumNumPredicates As Integer
        Dim _cumNumObjects As Integer
        Dim _cumNumJunctions As Integer
        Dim _cumNumParticles As Integer
        Dim _cumNumInterpuncts As Integer
    End Structure

    ' Subject
    Structure GSubject
        Dim _Nominativ As String
        Dim _Type As String
        Dim _Genus As String
        Dim _Number As String
        Dim _Article As String
        Dim _Adjective As String
        Dim _AdjType As String
        Dim _AdjKomp As String
        Dim _Adverb As String
        Dim _AdvType As String
        Dim _AdvKomp As String
        Dim _Participe As String
        Dim _ParTemp As String
        Dim _ParMod As String
        Dim _ParGenV As String
        Dim _Duplicate As String
    End Structure

    ' Predicate
    Structure GPredicate
        Dim _Infinitiv As String
        Dim _Person As String
        Dim _Number As String
        Dim _Tempus As String
        Dim _Modus As String
        Dim _GenusVerbi As String
        Dim _SpezValenz As String
        Dim _Adverb As String
        Dim _AdvType As String
        Dim _AdvKomp As String
        Dim _Duplicate As String
    End Structure

    ' Object
    Structure GObject
        Dim _Nominativ As String
        Dim _Type As String
        Dim _Case As String
        Dim _Genus As String
        Dim _Number As String
        Dim _Article As String
        Dim _Adjective As String
        Dim _AdjType As String
        Dim _AdjKomp As String
        Dim _Adverb As String
        Dim _AdvType As String
        Dim _AdvKomp As String
        Dim _Participe As String
        Dim _ParTemp As String
        Dim _ParMod As String
        Dim _ParGenV As String
        Dim _Preposition As String
        Dim _Duplicate As String
    End Structure

    ' Junction
    Structure GJunction
        Dim _Text As String
        Dim _Type As String
    End Structure

    ' Particle
    Structure GParticle
        Dim _Text As String
        Dim _Type As String
    End Structure

    ' Interpunctation Mark
    Structure GInterpunct
        Dim _Text As String
        Dim _Type As String
    End Structure

    ' Synonyms
    Structure VSynonym
        Dim _num As Integer
        Dim _Indices() As Integer
        Dim _Syn() As String
        Dim _Kon() As String
        Dim _Esp() As String
    End Structure

    ' Buch
    Structure ThemBook
        Dim _Tables() As Integer
        Dim _Words() As Long
    End Structure

    Function translateToEsperanto(ByVal language As Integer) As String
        ' Translation to Esperanto
        Dim strEsperanto As String
        Dim strGer As String
        Dim strEsp As String
        Dim strEspNum As String
        Dim strEspCasAnte As String
        Dim strEspCasPost As String
        Dim strEspPrep As String
        Dim strEspArt As String
        Dim strEspDupl As String
        Dim strEspAdj As String
        Dim strEspAdjKomp As String
        Dim strEspAdv As String
        Dim strEspAdvKomp As String
        Dim strEspTemp As String
        Dim strEspPassSein As String
        Dim strEspParticipe As String
        Dim strEspJun As String
        Dim strEspPar As String
        Dim strError As String
        Dim checkInvDone As Boolean
        Dim objectBuilt As Boolean
        Dim iCumSum As Integer
        Dim i As Integer
        Dim j As Integer

        strEsperanto = ""
        strError = ""

        ' Check (Template Problem)
        'If (pubDataGrammar._Subject(1)._Article = "" Or pubDataGrammar._Subject(1)._Number = "" Or _
        '    pubDataGrammar._Predicate(1)._Number = "" Or pubDataGrammar._Object(1)._Case = "" Or _
        '    pubDataGrammar._Object(1)._Article = "" Or pubDataGrammar._Object(1)._Number = "") Then
        '    MsgBox("Not all Data needed have been entered! Please check Properties of each Part of Speech!", MsgBoxStyle.Information, "Missing Data")
        '    translateToEsperanto = ""
        '    Exit Function
        'End If


        ' (Teil-)Satz
        For j = 1 To pubDataGrammar.countSentence

            strEsp = ""
            strEspNum = ""
            strEspCasAnte = ""
            strEspCasPost = ""
            strEspPrep = ""
            strEspArt = ""
            strEspDupl = ""
            strEspAdj = ""
            strEspAdjKomp = ""
            strEspAdv = ""
            strEspAdvKomp = ""
            strEspTemp = ""
            strEspPassSein = ""
            strEspParticipe = ""
            strEspJun = ""
            strEspPar = ""

            ' Junktion
            For i = 1 To pubDataGrammar._Sentence(j)._numJunctions
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumJunctions
                ' Vokabular
                strGer = pubDataGrammar._Junction(iCumSum)._Text
                strEsp = lookForExpr(language, strGer, WordType.Junction)
                ' nicht gefunden ?
                If (strEsp = "") Then
                    strEsp = "<!notfound!>"
                    strError = strError & ", " & strGer
                End If
                strEspJun = strEsp
                ' Junktion fertigstellen
                strEsperanto = strEsperanto & " " & strEspJun
            Next

            strEsp = ""
            strEspNum = ""
            strEspCasAnte = ""
            strEspCasPost = ""
            strEspPrep = ""
            strEspArt = ""
            strEspDupl = ""
            strEspAdj = ""
            strEspAdjKomp = ""
            strEspAdv = ""
            strEspAdvKomp = ""
            strEspTemp = ""
            strEspPassSein = ""
            strEspParticipe = ""
            strEspJun = ""
            strEspPar = ""

            ' Partikel
            For i = 1 To pubDataGrammar._Sentence(j)._numParticles
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumParticles
                ' Vokabular
                strGer = pubDataGrammar._Particle(iCumSum)._Text
                strEsp = lookForExpr(language, strGer, WordType.Particle)
                ' nicht gefunden ?
                If (strEsp = "") Then
                    strEsp = "<!notfound!>"
                    strError = strError & ", " & strGer
                End If
                strEspPar = strEsp
                ' Partikel fertigstellen, mit Komma
                strEsperanto = strEsperanto & " " & strEspPar & ","
            Next

            strEsp = ""
            strEspNum = ""
            strEspCasAnte = ""
            strEspCasPost = ""
            strEspPrep = ""
            strEspArt = ""
            strEspDupl = ""
            strEspAdj = ""
            strEspAdjKomp = ""
            strEspAdv = ""
            strEspAdvKomp = ""
            strEspTemp = ""
            strEspPassSein = ""
            strEspParticipe = ""
            strEspJun = ""
            strEspPar = ""

            ' Check Subject-Object-Inversion in Relativ-Saetzen: Sprung zu Objekt
            checkInvDone = False
            objectBuilt = False
            If (pubDataGrammar._Object(iCumSum)._Type = "Relativpron" And CInt(Val(pubDataGrammar._Object(iCumSum)._Case)) > 1) Then GoTo check_Inversion
check_InvBack:
            checkInvDone = True

            ' Subjekt
            For i = 1 To pubDataGrammar._Sentence(j)._numSubjects
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumSubjects
                ' Vokabular
                strGer = pubDataGrammar._Subject(iCumSum)._Nominativ
                If (pubDataGrammar._Subject(iCumSum)._Type = "Pronomen") Then
                    ' Pronomen
                    strEsp = lookForExpr(language, strGer, WordType.Pronomen)
                ElseIf (pubDataGrammar._Subject(iCumSum)._Type = "Nomen") Then
                    ' Nomen
                    strEsp = lookForExpr(language, strGer, WordType.Nomen)
                ElseIf (pubDataGrammar._Subject(iCumSum)._Type = "Name") Then
                    ' Eigenname
                    strEsp = strGer
                ElseIf (pubDataGrammar._Subject(iCumSum)._Type = "Relativpron") Then
                    ' Relativpronomen
                    strEsp = lookForExpr(language, strGer, WordType.Pronomen)
                Else
                    ' Fehler
                    MsgBox("Sentence No." & j.ToString & "/Subject No." & i.ToString & ": Type not known: " & pubDataGrammar._Subject(iCumSum)._Type, MsgBoxStyle.Critical, "Translator")
                    translateToEsperanto = "<!key word error!>"
                    Exit Function
                End If
                ' nicht gefunden ?
                If (strEsp = "") Then
                    strEsp = "<!notfound!>"
                    strError = strError & ", " & strGer
                End If
                ' Artikel
                If (CInt(Val(pubDataGrammar._Subject(iCumSum)._Article)) = 1) Then
                    strEspArt = pubEspArticle
                Else
                    strEspArt = pubEspNoArticle
                End If
                ' Numerus
                If (CInt(Val(pubDataGrammar._Subject(iCumSum)._Number)) = 2) Then
                    strEspNum = pubEspPlural
                Else
                    strEspNum = pubEspSingular
                End If
                ' Adjektiv
                If (pubDataGrammar._Subject(iCumSum)._Adjective <> "") Then
                    If (pubDataGrammar._Subject(iCumSum)._AdjType = "Possesiv") Then
                        ' Possesiv-Pronomen
                        strEspAdj = lookForExpr(language, pubDataGrammar._Subject(iCumSum)._Adjective, WordType.Pronomen)
                    ElseIf (pubDataGrammar._Subject(iCumSum)._AdjType = "Normal") Then
                        ' Normales Adjektiv
                        strEspAdj = lookForExpr(language, pubDataGrammar._Subject(iCumSum)._Adjective, WordType.Adjective)
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adjective of Subject No." & i.ToString & ": Type not known: " & pubDataGrammar._Subject(iCumSum)._AdjType, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    If (strEspAdj = "") Then
                        strEspAdj = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Subject(iCumSum)._Adjective
                    End If
                    If (pubDataGrammar._Subject(iCumSum)._AdjKomp = "Positiv") Then
                        strEspAdjKomp = pubEspAdjPositive
                    ElseIf (pubDataGrammar._Subject(iCumSum)._AdjKomp = "Komparativ") Then
                        strEspAdjKomp = pubEspAdjKomparative
                    ElseIf (pubDataGrammar._Subject(iCumSum)._AdjKomp = "Superlativ") Then
                        strEspAdjKomp = pubEspAdjSuperlative
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adjective of Subject No." & i.ToString & ": Komparativ-Type not known: " & pubDataGrammar._Subject(iCumSum)._AdjKomp, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    strEspAdj = strEspAdjKomp & " " & strEspAdj & strEspNum
                Else
                    strEspAdj = ""
                End If
                ' Adverb
                If (pubDataGrammar._Subject(iCumSum)._Adverb <> "") Then
                    If (pubDataGrammar._Subject(iCumSum)._AdvType = "Original") Then
                        strEspAdv = lookForExpr(language, pubDataGrammar._Subject(iCumSum)._Adverb, WordType.Adverb)
                    ElseIf (pubDataGrammar._Subject(iCumSum)._AdvType = "Derivat") Then
                        strEspAdv = lookForExpr(language, pubDataGrammar._Subject(iCumSum)._Adverb, WordType.Adjective)
                        strEspAdv = strEspAdv.Substring(0, Len(strEspAdv - 1)) & strEspAdvDerivat
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adverb of Subject No." & i.ToString & ": Type not known: " & pubDataGrammar._Subject(iCumSum)._AdvType, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    If (strEspAdv = "") Then
                        strEspAdv = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Subject(iCumSum)._Adverb
                    End If
                    If (pubDataGrammar._Subject(iCumSum)._AdvKomp = "Positiv") Then
                        strEspAdvKomp = pubEspAdvPositive
                    ElseIf (pubDataGrammar._Subject(iCumSum)._AdvKomp = "Komparativ") Then
                        strEspAdvKomp = pubEspAdvKomparative
                    ElseIf (pubDataGrammar._Subject(iCumSum)._AdvKomp = "Superlativ") Then
                        strEspAdvKomp = pubEspAdvSuperlative
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adverb of Subject No." & i.ToString & ": Komparativ-Type not known: " & pubDataGrammar._Subject(iCumSum)._AdvKomp, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    strEspAdv = strEspAdvKomp & " " & strEspAdv & strEspNum
                Else
                    strEspAdv = ""
                End If
                ' Partizipial-Ergaenzung
                If (pubDataGrammar._Subject(iCumSum)._Participe <> "") Then
                    ' Vokabular
                    strEspParticipe = lookForExpr(language, pubDataGrammar._Subject(iCumSum)._Participe, WordType.Verb)
                    If (strEspParticipe = "") Then
                        strEspParticipe = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Subject(iCumSum)._Participe
                    End If
                    ' Zeitform
                    If (pubDataGrammar._Subject(iCumSum)._ParGenV = "Aktiv") Then
                        ' Aktiv
                        If (pubDataGrammar._Subject(iCumSum)._ParMod = "Indikativ") Then
                            ' Indikativ
                            If (pubDataGrammar._Subject(iCumSum)._ParTemp = "Praesens") Then
                                strEspTemp = pubEspParAktiPresent
                            ElseIf (pubDataGrammar._Subject(iCumSum)._ParTemp = "Praeteritum") Then
                                strEspTemp = pubEspParAktiPraeteritum
                            ElseIf (pubDataGrammar._Subject(iCumSum)._ParTemp = "Futur") Then
                                strEspTemp = pubEspParAktiFutur
                            Else
                                ' Fehler
                                MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Subject(iCumSum)._ParTemp, MsgBoxStyle.Critical, "Translator")
                                translateToEsperanto = "<!key word error!>"
                                Exit Function
                            End If
                        ElseIf (pubDataGrammar._Subject(iCumSum)._ParMod = "Konjunktiv") Then
                            ' Konjunktiv - nicht implementiert
                            MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": Modus not implemented: " & pubDataGrammar._Subject(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!implementation!>"
                            Exit Function
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": Modus not known: " & pubDataGrammar._Subject(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                    ElseIf (pubDataGrammar._Subject(iCumSum)._ParGenV = "Passiv") Then
                        ' Passiv
                        If (pubDataGrammar._Subject(iCumSum)._ParMod = "Indikativ") Then
                            ' Indikativ
                            If (pubDataGrammar._Subject(iCumSum)._ParTemp = "Praesens") Then
                                strEspTemp = pubEspParPassPresent
                            ElseIf (pubDataGrammar._Subject(iCumSum)._ParTemp = "Praeteritum") Then
                                strEspTemp = pubEspParPassPraeteritum
                            ElseIf (pubDataGrammar._Subject(iCumSum)._ParTemp = "Futur") Then
                                strEspTemp = pubEspParPassFutur
                            Else
                                ' Fehler
                                MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Subject(iCumSum)._ParTemp, MsgBoxStyle.Critical, "Translator")
                                translateToEsperanto = "<!key word error!>"
                                Exit Function
                            End If
                            ' sein-Form
                            strEspPassSein = "estas"
                        ElseIf (pubDataGrammar._Subject(iCumSum)._ParMod = "Konjunktiv") Then
                            ' Konjunktiv - nicht implementiert
                            MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": Modus not implemented: " & pubDataGrammar._Subject(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!implementation!>"
                            Exit Function
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": Modus not known: " & pubDataGrammar._Subject(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Participe of Subject No." & i.ToString & ": GenusVerbi not known: " & pubDataGrammar._Subject(iCumSum)._ParGenV, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    ' Partzipial-Ergaenzung
                    strEspParticipe = strEspParticipe.Substring(0, Len(strEspParticipe) - 1) & strEspTemp
                End If
                ' Mehrfaches Subjekt
                If (pubDataGrammar._Subject(iCumSum)._Duplicate <> "" And i > 1) Then
                    strEspDupl = lookForExpr(language, pubDataGrammar._Subject(iCumSum)._Duplicate, WordType.Junction)
                    ' nicht gefunden ?
                    If (strEspDupl = "") Then
                        strEspDupl = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Subject(iCumSum)._Duplicate
                    End If
                Else
                    strEspDupl = ""
                End If
                ' Subjekt fertigstellen
                ' Duplikat - Artikel - Adjektiv - Adverb - Stamm - Numerus - Partizip
                strEsperanto = strEsperanto & " " & strEspDupl & " " & strEspArt & " " & strEspAdj & " " & strEspAdv & " " & strEsp & strEspNum & " " & strEspParticipe
            Next

            strEsp = ""
            strEspNum = ""
            strEspCasAnte = ""
            strEspCasPost = ""
            strEspPrep = ""
            strEspArt = ""
            strEspDupl = ""
            strEspAdj = ""
            strEspAdjKomp = ""
            strEspAdv = ""
            strEspAdvKomp = ""
            strEspTemp = ""
            strEspPassSein = ""
            strEspParticipe = ""
            strEspJun = ""
            strEspPar = ""

            ' Preadikat
            For i = 1 To pubDataGrammar._Sentence(j)._numPredicates
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumPredicates
                ' Vokabular
                strGer = pubDataGrammar._Predicate(iCumSum)._Infinitiv
                strEsp = lookForExpr(language, strGer, WordType.Verb)
                If (strEsp = "") Then
                    strEsp = "<!notfound!>"
                    strError = strError & ", " & strGer
                End If
                ' Numerus
                If (CInt(Val(pubDataGrammar._Predicate(iCumSum)._Number)) = 2) Then
                    strEspNum = pubEspPlural
                Else
                    strEspNum = pubEspSingular
                End If
                ' Adverb
                If (pubDataGrammar._Predicate(iCumSum)._Adverb <> "") Then
                    If (pubDataGrammar._Predicate(iCumSum)._AdvType = "Original") Then
                        strEspAdv = lookForExpr(language, pubDataGrammar._Predicate(iCumSum)._Adverb, WordType.Adverb)
                    ElseIf (pubDataGrammar._Predicate(iCumSum)._AdvType = "Derivat") Then
                        strEspAdv = lookForExpr(language, pubDataGrammar._Predicate(iCumSum)._Adverb, WordType.Adjective)
                        strEspAdv = strEspAdv.Substring(0, Len(strEspAdv) - 1) & strEspAdvDerivat
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adverb of Predicate No." & i.ToString & ": Type not known: " & pubDataGrammar._Predicate(iCumSum)._AdvType, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    If (strEspAdv = "") Then
                        strEspAdv = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Predicate(iCumSum)._Adverb
                    End If
                    If (pubDataGrammar._Predicate(iCumSum)._AdvKomp = "Positiv") Then
                        strEspAdvKomp = pubEspAdvPositive
                    ElseIf (pubDataGrammar._Predicate(iCumSum)._AdvKomp = "Komparativ") Then
                        strEspAdvKomp = pubEspAdvKomparative
                    ElseIf (pubDataGrammar._Predicate(iCumSum)._AdvKomp = "Superlativ") Then
                        strEspAdvKomp = pubEspAdvSuperlative
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adverb of Subject No." & i.ToString & ": Komparativ-Type not known: " & pubDataGrammar._Predicate(iCumSum)._AdvKomp, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    strEspAdv = strEspAdvKomp & " " & strEspAdv & strEspNum
                Else
                    strEspAdv = ""
                End If
                ' Zeit
                If (pubDataGrammar._Predicate(iCumSum)._GenusVerbi = "Aktiv") Then
                    ' Aktiv
                    If (pubDataGrammar._Predicate(iCumSum)._Modus = "Indikativ") Then
                        ' Indikativ
                        If (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praesens") Then
                            strEspTemp = pubEspIndPresent
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praeteritum") Then
                            strEspTemp = pubEspIndPraeteritum
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Futur") Then
                            strEspTemp = pubEspIndFutur
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Predicate(iCumSum)._Tempus, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                    ElseIf (pubDataGrammar._Predicate(iCumSum)._Modus = "Konjunktiv") Then
                        ' Konjunktiv
                        If (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praesens") Then
                            strEspTemp = pubEspKonPresent
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praeteritum") Then
                            strEspTemp = pubEspKonPraeteritum
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Futur") Then
                            strEspTemp = pubEspKonFutur
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Predicate(iCumSum)._Tempus, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                    ElseIf (pubDataGrammar._Predicate(iCumSum)._Modus = "Imperativ") Then
                        ' Befehlsform
                        strEspTemp = pubEspImpImperative
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": Modus not known: " & pubDataGrammar._Predicate(iCumSum)._Modus, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    ' Mehrfaches Praedikat
                    If (pubDataGrammar._Predicate(iCumSum)._Duplicate <> "" And i > 1) Then
                        strEspDupl = lookForExpr(language, pubDataGrammar._Predicate(iCumSum)._Duplicate, WordType.Junction)
                        ' nicht gefunden ?
                        If (strEspDupl = "") Then
                            strEspDupl = "<!notfound!>"
                            strError = strError & ", " & pubDataGrammar._Predicate(iCumSum)._Duplicate
                        End If
                    Else
                        strEspDupl = ""
                    End If
                    ' Praedikat Aktiv fertigstellen
                    ' Duplikat - Stamm - Endung - Adverb
                    strEsperanto = strEsperanto & " " & strEspDupl & " " & strEsp.Substring(0, Len(strEsp) - 1) & strEspTemp & " " & strEspAdv
                ElseIf (pubDataGrammar._Predicate(iCumSum)._GenusVerbi = "Passiv") Then
                    ' Passiv
                    If (pubDataGrammar._Predicate(iCumSum)._Modus = "Indikativ") Then
                        ' Indikativ
                        If (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praesens") Then
                            strEspTemp = pubEspParPassPresent
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praeteritum") Then
                            strEspTemp = pubEspParPassPraeteritum
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Futur") Then
                            strEspTemp = pubEspParPassFutur
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Predicate(iCumSum)._Tempus, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                        ' sein-Form
                        strEspPassSein = "estas"
                    ElseIf (pubDataGrammar._Predicate(iCumSum)._Modus = "Konjunktiv") Then
                        ' Konjunktiv
                        If (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praesens") Then
                            strEspTemp = pubEspParPassPresent
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Praeteritum") Then
                            strEspTemp = pubEspParPassPraeteritum
                        ElseIf (pubDataGrammar._Predicate(iCumSum)._Tempus = "Futur") Then
                            strEspTemp = pubEspParPassFutur
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Predicate(iCumSum)._Tempus, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                        ' sein-Form
                        strEspPassSein = "estus"
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": Modus not known: " & pubDataGrammar._Predicate(iCumSum)._Modus, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    ' Mehrfaches Praedikat
                    If (pubDataGrammar._Predicate(iCumSum)._Duplicate <> "" And i > 1) Then
                        strEspDupl = lookForExpr(language, pubDataGrammar._Predicate(iCumSum)._Duplicate, WordType.Junction)
                        ' nicht gefunden ?
                        If (strEspDupl = "") Then
                            strEspDupl = "<!notfound!>"
                            strError = strError & ", " & pubDataGrammar._Predicate(iCumSum)._Duplicate
                        End If
                    Else
                        strEspDupl = ""
                    End If
                    ' Praedikat Passiv fertigstellen
                    ' Duplikat - sein-Form - Stamm - Endung - Numerus - Adverb
                    strEsperanto = strEsperanto & " " & strEspDupl & " " & strEspPassSein & " " & strEsp.Substring(0, Len(strEsp) - 1) & strEspTemp & strEspNum & " " & strEspAdv
                ElseIf (pubDataGrammar._Predicate(iCumSum)._GenusVerbi = "Auxiliarcomes") Then
                    ' Begleiter eines Hilfsverbs
                    ' Mehrfaches Praedikat
                    If (pubDataGrammar._Predicate(iCumSum)._Duplicate <> "" And i > 1) Then
                        strEspDupl = lookForExpr(language, pubDataGrammar._Predicate(iCumSum)._Duplicate, WordType.Junction)
                        ' nicht gefunden ?
                        If (strEspDupl = "") Then
                            strEspDupl = "<!notfound!>"
                            strError = strError & ", " & pubDataGrammar._Predicate(iCumSum)._Duplicate
                        End If
                    Else
                        strEspDupl = ""
                    End If
                    ' Praedikat-Begleiter fertigstellen
                    ' Duplikat - Infinitiv - Adverb
                    strEsperanto = strEsperanto & " " & strEspDupl & " " & strEsp & " " & strEspAdv
                Else
                    ' Fehler
                    MsgBox("Sentence No." & j.ToString & "/Predicate No." & i.ToString & ": GenusVerbi not known: " & pubDataGrammar._Predicate(iCumSum)._GenusVerbi, MsgBoxStyle.Critical, "Translator")
                    translateToEsperanto = "<!key word error!>"
                    Exit Function
                End If
            Next

            strEsp = ""
            strEspNum = ""
            strEspCasAnte = ""
            strEspCasPost = ""
            strEspPrep = ""
            strEspArt = ""
            strEspDupl = ""
            strEspAdj = ""
            strEspAdjKomp = ""
            strEspAdv = ""
            strEspAdvKomp = ""
            strEspTemp = ""
            strEspPassSein = ""
            strEspParticipe = ""
            strEspJun = ""
            strEspPar = ""

            ' Check Subject-Object-Inversion in Relativ-Saetzen: Check Objekte
check_Inversion:

            If (objectBuilt = True) Then GoTo object_end

            ' Objekt
            For i = 1 To pubDataGrammar._Sentence(j)._numObjects
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumObjects
                ' Vokabular
                strGer = pubDataGrammar._Object(iCumSum)._Nominativ
                If (pubDataGrammar._Object(iCumSum)._Type = "Pronomen") Then
                    ' Pronomen
                    strEsp = lookForExpr(language, strGer, WordType.Pronomen)
                ElseIf (pubDataGrammar._Object(iCumSum)._Type = "Nomen") Then
                    ' Nomen
                    strEsp = lookForExpr(language, strGer, WordType.Nomen)
                ElseIf (pubDataGrammar._Object(iCumSum)._Type = "Name") Then
                    ' Eigenname
                    strEsp = strGer
                ElseIf (pubDataGrammar._Object(iCumSum)._Type = "Relativpron") Then
                    ' Relativpronomen
                    strEsp = lookForExpr(language, strGer, WordType.Pronomen)
                Else
                    ' Fehler
                    MsgBox("Sentence No." & j.ToString & "/Object No." & i.ToString & ": Type not known: " & pubDataGrammar._Object(iCumSum)._Type, MsgBoxStyle.Critical, "Translator")
                    translateToEsperanto = "<!key word error!>"
                    Exit Function
                End If
                If (strEsp = "") Then
                    strEsp = "<!notfound!>"
                    strError = strError & ", " & strGer
                End If
                ' Artikel
                If (CInt(Val(pubDataGrammar._Object(iCumSum)._Article)) = 1) Then
                    strEspArt = pubEspArticle
                Else
                    strEspArt = pubEspNoArticle
                End If
                ' Numerus
                If (CInt(Val(pubDataGrammar._Object(iCumSum)._Number)) = 2) Then
                    strEspNum = pubEspPlural
                Else
                    strEspNum = pubEspSingular
                End If
                ' Kasus
                Select Case (pubDataGrammar._Object(iCumSum)._Case)
                    Case 1
                        strEspCasAnte = pubEspNominative
                        strEspCasPost = ""
                    Case 2
                        strEspCasAnte = pubEspGenitive
                        strEspCasPost = ""
                    Case 3
                        strEspCasAnte = pubEspDative
                        strEspCasPost = ""
                    Case 4
                        strEspCasAnte = ""
                        strEspCasPost = pubEspAccusative
                End Select
                ' Praeposition
                If (pubDataGrammar._Object(iCumSum)._Preposition <> "") Then
                    strEspPrep = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Preposition, WordType.Preposition)
                    ' in der Regel Nominativ
                    strEspCasAnte = strEspPrep
                    strEspCasPost = ""
                    If (strEspPrep = "") Then
                        strEspPrep = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Object(iCumSum)._Preposition
                    End If
                End If
                ' Adjektiv
                If (pubDataGrammar._Object(iCumSum)._Adjective <> "") Then
                    If (pubDataGrammar._Object(iCumSum)._AdjType = "Possesiv") Then
                        ' Possesiv-Pronomen
                        strEspAdj = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Adjective, WordType.Pronomen)
                    ElseIf (pubDataGrammar._Object(iCumSum)._AdjType = "Normal") Then
                        ' normales Adjektiv
                        strEspAdj = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Adjective, WordType.Adjective)
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adjective of Object No." & i.ToString & ": Type not known: " & pubDataGrammar._Object(iCumSum)._AdjType, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    If (strEspAdj = "") Then
                        strEspAdj = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Object(iCumSum)._Adjective
                    End If
                    If (pubDataGrammar._Object(iCumSum)._AdjKomp = "Positiv") Then
                        strEspAdjKomp = pubEspAdjPositive
                    ElseIf (pubDataGrammar._Object(iCumSum)._AdjKomp = "Komparativ") Then
                        strEspAdjKomp = pubEspAdjKomparative
                    ElseIf (pubDataGrammar._Object(iCumSum)._AdjKomp = "Superlativ") Then
                        strEspAdjKomp = pubEspAdjSuperlative
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adjective of Object No." & i.ToString & ": Komparativ-Type not known: " & pubDataGrammar._Object(iCumSum)._AdjKomp, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    strEspAdj = strEspAdjKomp & " " & strEspAdj & strEspNum & strEspCasPost
                Else
                    strEspAdj = ""
                End If
                ' Adverb
                If (pubDataGrammar._Object(iCumSum)._Adverb <> "") Then
                    If (pubDataGrammar._Object(iCumSum)._AdvType = "Original") Then
                        strEspAdv = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Adverb, WordType.Adverb)
                    ElseIf (pubDataGrammar._Object(iCumSum)._AdvType = "Derivat") Then
                        strEspAdv = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Adverb, WordType.Adjective)
                        strEspAdv = strEspAdv.Substring(0, Len(strEspAdv - 1)) & strEspAdvDerivat
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adverb of Object No." & i.ToString & ": Type not known: " & pubDataGrammar._Object(iCumSum)._AdvType, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    If (strEspAdv = "") Then
                        strEspAdv = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Object(iCumSum)._Adverb
                    End If
                    If (pubDataGrammar._Object(iCumSum)._AdvKomp = "Positiv") Then
                        strEspAdvKomp = pubEspAdvPositive
                    ElseIf (pubDataGrammar._Object(iCumSum)._AdvKomp = "Komparativ") Then
                        strEspAdvKomp = pubEspAdvKomparative
                    ElseIf (pubDataGrammar._Object(iCumSum)._AdvKomp = "Superlativ") Then
                        strEspAdvKomp = pubEspAdvSuperlative
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Adverb of Object No." & i.ToString & ": Komparativ-Type not known: " & pubDataGrammar._Object(iCumSum)._AdvKomp, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    strEspAdv = strEspAdvKomp & " " & strEspAdv & strEspNum
                Else
                    strEspAdv = ""
                End If
                ' Partizipial-Ergaenzung
                If (pubDataGrammar._Object(iCumSum)._Participe <> "") Then
                    ' Vokabular
                    strEspParticipe = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Participe, WordType.Verb)
                    If (strEspParticipe = "") Then
                        strEspParticipe = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Object(iCumSum)._Participe
                    End If
                    ' Zeitform
                    If (pubDataGrammar._Object(iCumSum)._ParGenV = "Aktiv") Then
                        ' Aktiv
                        If (pubDataGrammar._Object(iCumSum)._ParMod = "Indikativ") Then
                            ' Indikativ
                            If (pubDataGrammar._Object(iCumSum)._ParTemp = "Praesens") Then
                                strEspTemp = pubEspParAktiPresent
                            ElseIf (pubDataGrammar._Object(iCumSum)._ParTemp = "Praeteritum") Then
                                strEspTemp = pubEspParAktiPraeteritum
                            ElseIf (pubDataGrammar._Object(iCumSum)._ParTemp = "Futur") Then
                                strEspTemp = pubEspParAktiFutur
                            Else
                                ' Fehler
                                MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Object(iCumSum)._ParTemp, MsgBoxStyle.Critical, "Translator")
                                translateToEsperanto = "<!key word error!>"
                                Exit Function
                            End If
                        ElseIf (pubDataGrammar._Object(iCumSum)._ParMod = "Konjunktiv") Then
                            ' Konjunktiv - nicht implementiert
                            MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": Modus not implemented: " & pubDataGrammar._Object(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!implementation!>"
                            Exit Function
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": Modus not known: " & pubDataGrammar._Object(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                    ElseIf (pubDataGrammar._Object(iCumSum)._ParGenV = "Passiv") Then
                        ' Passiv
                        If (pubDataGrammar._Object(iCumSum)._ParMod = "Indikativ") Then
                            ' Indikativ
                            If (pubDataGrammar._Object(iCumSum)._ParTemp = "Praesens") Then
                                strEspTemp = pubEspParPassPresent
                            ElseIf (pubDataGrammar._Object(iCumSum)._ParTemp = "Praeteritum") Then
                                strEspTemp = pubEspParPassPraeteritum
                            ElseIf (pubDataGrammar._Object(iCumSum)._ParTemp = "Futur") Then
                                strEspTemp = pubEspParPassFutur
                            Else
                                ' Fehler
                                MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": Tempus not known: " & pubDataGrammar._Object(iCumSum)._ParTemp, MsgBoxStyle.Critical, "Translator")
                                translateToEsperanto = "<!key word error!>"
                                Exit Function
                            End If
                            ' sein-Form
                            strEspPassSein = "estas"
                        ElseIf (pubDataGrammar._Subject(iCumSum)._ParMod = "Konjunktiv") Then
                            ' Konjunktiv - nicht implementiert
                            MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": Modus not implemented: " & pubDataGrammar._Object(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!implementation!>"
                            Exit Function
                        Else
                            ' Fehler
                            MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": Modus not known: " & pubDataGrammar._Object(iCumSum)._ParMod, MsgBoxStyle.Critical, "Translator")
                            translateToEsperanto = "<!key word error!>"
                            Exit Function
                        End If
                    Else
                        ' Fehler
                        MsgBox("Sentence No." & j.ToString & "/Participe of Object No." & i.ToString & ": GenusVerbi not known: " & pubDataGrammar._Object(iCumSum)._ParGenV, MsgBoxStyle.Critical, "Translator")
                        translateToEsperanto = "<!key word error!>"
                        Exit Function
                    End If
                    ' Partzipial-Ergaenzung
                    strEspParticipe = strEspParticipe.Substring(0, Len(strEspParticipe) - 1) & strEspTemp
                End If
                ' Mehrfaches Objekt
                If (pubDataGrammar._Object(iCumSum)._Duplicate <> "" And i > 1) Then
                    strEspDupl = lookForExpr(language, pubDataGrammar._Object(iCumSum)._Duplicate, WordType.Junction)
                    ' nicht gefunden ?
                    If (strEspDupl = "") Then
                        strEspDupl = "<!notfound!>"
                        strError = strError & ", " & pubDataGrammar._Object(iCumSum)._Duplicate
                    End If
                Else
                    strEspDupl = ""
                End If
                ' Check Subject-Object-Inversion in Relativ-Saetzen: 1. Normalfall or 2. Inversionsfall
                If ((checkInvDone = True And Not (pubDataGrammar._Object(iCumSum)._Type = "Relativpron" And pubDataGrammar._Object(iCumSum)._Case > 1)) Or _
                    (checkInvDone = False And (pubDataGrammar._Object(iCumSum)._Type = "Relativpron" And pubDataGrammar._Object(iCumSum)._Case > 1))) Then
                    ' Objekt mit Erweiterungen fertigstellen
                    ' Duplikat - Fallkennung(vor) - Artikel - Adjektiv - Adverb - Stamm - Numerus - Fallkennung(nach) - Partizip
                    strEsperanto = strEsperanto & " " & strEspDupl & " " & strEspCasAnte & " " & strEspArt & " " & strEspAdj & " " & strEspAdv & " " & strEsp & strEspNum & strEspCasPost & " " & strEspParticipe
                    objectBuilt = True
                End If
            Next

object_end:

            ' Check Subject-Object-Inversion in Relativ-Saetzen: Ruecksprung zu Subjekt
            If (checkInvDone = False) Then
                GoTo check_InvBack
            End If

            ' Teilsatz fertigstellen
            ' Satzzeichen anhaengen
            For i = 1 To pubDataGrammar._Sentence(j)._numInterpuncts
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumInterpuncts
                strEsperanto = strEsperanto & pubDataGrammar._Interpunct(iCumSum)._Text
            Next

        Next    ' (Teil-)Satz

        ' Rueckgabe
        translateToEsperanto = strEsperanto

        ' Anzeige
        frmEsperanto.TextBoxFehler.Text = ""
        If (strError <> "") Then
            frmEsperanto.TextBoxFehler.Text = "Not in Vocabulary: " & strError
        End If

    End Function

    Function lookForExpr(ByVal language As Integer, ByVal GerExpression As String, ByVal type As WordType) As String
        ' Search Expression in Vocabulary
        Dim VSyn As VSynonym
        Dim strEsp As String
        Dim i As Integer

        ' Test auf Mehrdeutigkeiten
        strEsp = ""
        VSyn = lookForMultiples(pubFromLanguage, GerExpression, type)
        If (VSyn._num > 1) Then
            strEsp = checkMultiples(GerExpression, VSyn)
            ' Rueckgabe
            lookForExpr = strEsp
            Exit Function
        End If

        If (type = WordType.Pronomen) Then
            For i = 1 To countVocPronomen
                If (language = LangName.Deutsch And pubVocabularyPro(i)._GerPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.English And pubVocabularyPro(i)._EngPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Francais And pubVocabularyPro(i)._FraPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Espanol And pubVocabularyPro(i)._SpaPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Italiano And pubVocabularyPro(i)._ItaPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Portoguese And pubVocabularyPro(i)._PorPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Dansk And pubVocabularyPro(i)._DanPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Svenska And pubVocabularyPro(i)._SwePronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Ellenika And pubVocabularyPro(i)._GrePronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Russkij And pubVocabularyPro(i)._RusPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Polski And pubVocabularyPro(i)._PolPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Hrvatski And pubVocabularyPro(i)._CroPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.AnyLang And pubVocabularyPro(i)._AnyPronomen = GerExpression) Then
                    strEsp = pubVocabularyPro(i)._EspPronomen
                End If
            Next
        ElseIf (type = WordType.Nomen) Then
            For i = 1 To countVocNomen
                If (language = LangName.Deutsch And pubVocabularyNom(i)._GerNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.English And pubVocabularyNom(i)._EngNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Francais And pubVocabularyNom(i)._FraNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Espanol And pubVocabularyNom(i)._SpaNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Italiano And pubVocabularyNom(i)._ItaNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Portoguese And pubVocabularyNom(i)._PorNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Dansk And pubVocabularyNom(i)._DanNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Svenska And pubVocabularyNom(i)._SweNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Ellenika And pubVocabularyNom(i)._GreNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Russkij And pubVocabularyNom(i)._RusNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Polski And pubVocabularyNom(i)._PolNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Hrvatski And pubVocabularyNom(i)._CroNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.AnyLang And pubVocabularyNom(i)._AnyNomen = GerExpression) Then
                    strEsp = pubVocabularyNom(i)._EspNomen
                End If
            Next
        ElseIf (type = WordType.Verb) Then
            For i = 1 To countVocVerb
                If (language = LangName.Deutsch And pubVocabularyVer(i)._GerVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.English And pubVocabularyVer(i)._EngVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Francais And pubVocabularyVer(i)._FraVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Espanol And pubVocabularyVer(i)._SpaVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Italiano And pubVocabularyVer(i)._ItaVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Portoguese And pubVocabularyVer(i)._PorVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Dansk And pubVocabularyVer(i)._DanVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Svenska And pubVocabularyVer(i)._SweVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Ellenika And pubVocabularyVer(i)._GreVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Russkij And pubVocabularyVer(i)._RusVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Polski And pubVocabularyVer(i)._PolVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Hrvatski And pubVocabularyVer(i)._CroVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.AnyLang And pubVocabularyVer(i)._AnyVerb = GerExpression) Then
                    strEsp = pubVocabularyVer(i)._EspVerb
                End If
            Next
        ElseIf (type = WordType.Adverb) Then
            For i = 1 To countVocAdverb
                If (language = LangName.Deutsch And pubVocabularyAdv(i)._GerAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.English And pubVocabularyAdv(i)._EngAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Francais And pubVocabularyAdv(i)._FraAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Espanol And pubVocabularyAdv(i)._SpaAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Italiano And pubVocabularyAdv(i)._ItaAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Portoguese And pubVocabularyAdv(i)._PorAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Dansk And pubVocabularyAdv(i)._DanAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Svenska And pubVocabularyAdv(i)._SweAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Ellenika And pubVocabularyAdv(i)._GreAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Russkij And pubVocabularyAdv(i)._RusAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Polski And pubVocabularyAdv(i)._PolAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Hrvatski And pubVocabularyAdv(i)._CroAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.AnyLang And pubVocabularyAdv(i)._AnyAdverb = GerExpression) Then
                    strEsp = pubVocabularyAdv(i)._EspAdverb
                End If
            Next
        ElseIf (type = WordType.Adjective) Then
            For i = 1 To countVocAdjective
                If (language = LangName.Deutsch And pubVocabularyAdj(i)._GerAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.English And pubVocabularyAdj(i)._EngAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Francais And pubVocabularyAdj(i)._FraAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Espanol And pubVocabularyAdj(i)._SpaAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Italiano And pubVocabularyAdj(i)._ItaAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Portoguese And pubVocabularyAdj(i)._PorAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Dansk And pubVocabularyAdj(i)._DanAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Svenska And pubVocabularyAdj(i)._SweAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Ellenika And pubVocabularyAdj(i)._GreAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Russkij And pubVocabularyAdj(i)._RusAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Polski And pubVocabularyAdj(i)._PolAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Hrvatski And pubVocabularyAdj(i)._CroAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.AnyLang And pubVocabularyAdj(i)._AnyAdjective = GerExpression) Then
                    strEsp = pubVocabularyAdj(i)._EspAdjective
                End If
            Next
        ElseIf (type = WordType.Preposition) Then
            For i = 1 To countVocPreposition
                If (language = LangName.Deutsch And pubVocabularyPre(i)._GerPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.English And pubVocabularyPre(i)._EngPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Francais And pubVocabularyPre(i)._FraPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Espanol And pubVocabularyPre(i)._SpaPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Italiano And pubVocabularyPre(i)._ItaPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Portoguese And pubVocabularyPre(i)._PorPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Dansk And pubVocabularyPre(i)._DanPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Svenska And pubVocabularyPre(i)._SwePreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Ellenika And pubVocabularyPre(i)._GrePreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Russkij And pubVocabularyPre(i)._RusPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Polski And pubVocabularyPre(i)._PolPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Hrvatski And pubVocabularyPre(i)._CroPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.AnyLang And pubVocabularyPre(i)._AnyPreposition = GerExpression) Then
                    strEsp = pubVocabularyPre(i)._EspPreposition
                End If
            Next
        ElseIf (type = WordType.Particle) Then
            For i = 1 To countVocParticle
                If (language = LangName.Deutsch And pubVocabularyPar(i)._GerParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.English And pubVocabularyPar(i)._EngParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Francais And pubVocabularyPar(i)._FraParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Espanol And pubVocabularyPar(i)._SpaParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Italiano And pubVocabularyPar(i)._ItaParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Portoguese And pubVocabularyPar(i)._PorParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Dansk And pubVocabularyPar(i)._DanParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Svenska And pubVocabularyPar(i)._SweParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Ellenika And pubVocabularyPar(i)._GreParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Russkij And pubVocabularyPar(i)._RusParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Polski And pubVocabularyPar(i)._PolParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Hrvatski And pubVocabularyPar(i)._CroParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.AnyLang And pubVocabularyPar(i)._AnyParticle = GerExpression) Then
                    strEsp = pubVocabularyPar(i)._EspParticle
                End If
            Next
        ElseIf (type = WordType.Junction) Then
            For i = 1 To countVocJunction
                If (language = LangName.Deutsch And pubVocabularyJun(i)._GerJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.English And pubVocabularyJun(i)._EngJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Francais And pubVocabularyJun(i)._FraJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Espanol And pubVocabularyJun(i)._SpaJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Italiano And pubVocabularyJun(i)._ItaJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Portoguese And pubVocabularyJun(i)._PorJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Dansk And pubVocabularyJun(i)._DanJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Svenska And pubVocabularyJun(i)._SweJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Ellenika And pubVocabularyJun(i)._GreJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Russkij And pubVocabularyJun(i)._RusJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Polski And pubVocabularyJun(i)._PolJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Hrvatski And pubVocabularyJun(i)._CroJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.AnyLang And pubVocabularyJun(i)._AnyJunction = GerExpression) Then
                    strEsp = pubVocabularyJun(i)._EspJunction
                End If
            Next
        End If

        ' Rueckgabe
        lookForExpr = strEsp

    End Function

    Function printPretty(ByVal strEsperanto As String) As String
        ' Print with just one Blank and Printing of Esperanto-specific Letters
        Dim strPretty As String
        Dim strPretty2 As String
        Dim strArray As String()
        Dim strSingle As String
        Dim strSeparator As String() = New String(0) {" "}
        Dim strFlag As String = "|"
        Dim flag As Boolean
        Dim i As Integer


        ' nur je ein Leerzeichen
        strPretty = ""
        strArray = strEsperanto.Split(strSeparator, System.StringSplitOptions.RemoveEmptyEntries)
        For Each strPart In strArray
            strPretty = strPretty & strPart.Trim & " "
        Next

        ' besondere Buchstaben
        strPretty2 = ""
        flag = False
        For i = 0 To Len(strPretty) - 1
            strSingle = strPretty(i)
            If (strSingle = strFlag) Then
                ' Zeichen fuer Sonderbuchstabe des Esperanto
                flag = True
            Else
                If (flag = False) Then
                    ' normaler Buchstabe
                    If (i > 0) Then
                        strPretty2 = strPretty2 & strSingle
                    Else
                        ' Anfangsbuchstabe grozs
                        strPretty2 = strPretty2 & strSingle.ToUpper
                    End If
                Else
                    ' Sonderbuchstabe des Esperanto
                    If (strSingle = "c") Then
                        strSingle = strklCdach
                    ElseIf (strSingle = "g") Then
                        strSingle = strklGdach
                    ElseIf (strSingle = "h") Then
                        strSingle = strklHdach
                    ElseIf (strSingle = "j") Then
                        strSingle = strklJdach
                    ElseIf (strSingle = "s") Then
                        strSingle = strklSdach
                    ElseIf (strSingle = "u") Then
                        strSingle = strklUdach
                    ElseIf (strSingle = "C") Then
                        strSingle = strgrCdach
                    ElseIf (strSingle = "G") Then
                        strSingle = strgrGdach
                    ElseIf (strSingle = "H") Then
                        strSingle = strgrHdach
                    ElseIf (strSingle = "J") Then
                        strSingle = strgrJdach
                    ElseIf (strSingle = "S") Then
                        strSingle = strgrSdach
                    ElseIf (strSingle = "U") Then
                        strSingle = strgrUdach
                    End If
                    strPretty2 = strPretty2 & strSingle
                    flag = False
                End If
            End If
        Next

        ' Rueckgabe
        printPretty = strPretty2

    End Function

    Function formatPretty(ByVal number As Integer, ByVal maxlength As Integer) As String
        ' Print-Formatting for Integer-Numbers
        Dim strPretty As String
        Dim strLength As Integer
        Dim i As Integer

        strLength = number.ToString.Length
        strPretty = number.ToString
        For i = 1 To maxlength - strLength
            strPretty = "  " & strPretty
        Next

        ' Rueckgabe
        formatPretty = strPretty

    End Function

    Public Function showGrammarAsTreeview(ByVal par As Integer) As Boolean
        ' Display the XML-Grammar as TreeView
        ' TreeView Nodes: public
        Dim strGer As String
        Dim i As Integer
        Dim j As Integer
        Dim iCumSum As Integer
        Dim nodeCount As Integer

        ' Begriffe in den Sprachen
        ' Deutsch
        pubTermSentence(1) = "Satz"
        pubTermJunction(1) = "Junktion"
        pubTermParticle(1) = "Partikel"
        pubTermSubject(1) = "Subjekt"
        pubTermPredicate(1) = "Prädikat"
        pubTermObject(1) = "Objekt"
        pubTermInterpunction(1) = "Interpunktion"
        pubTermQualities(1) = "Eigenschaften"
        pubTermType(1) = "Typ"
        pubTermGender(1) = "Genus"
        pubTermNumber(1) = "Numerus"
        pubTermCase(1) = "Kasus"
        pubTermArticle(1) = "Artikel"
        pubTermPreposition(1) = "Präposition"
        pubTermDouble(1) = "Duplikat"
        pubTermAdjective(1) = "Adjektiv"
        pubTermAdverb(1) = "Adverb"
        pubTermComparison(1) = "Komparation"
        pubTermParticipe(1) = "Partizip"
        pubTermPerson(1) = "Person"
        pubTermTime(1) = "Tempus"
        pubTermMode(1) = "Modus"
        pubTermGenusVerbi(1) = "Genus Verbi"
        pubTermSpecValence(1) = "Spez. Valenz"
        ' English
        pubTermSentence(2) = "Sentence"
        pubTermJunction(2) = "Junction"
        pubTermParticle(2) = "Particle"
        pubTermSubject(2) = "Subject"
        pubTermPredicate(2) = "Predicate"
        pubTermObject(2) = "Object"
        pubTermInterpunction(2) = "Interpunction"
        pubTermQualities(2) = "Qualities"
        pubTermType(2) = "Type"
        pubTermGender(2) = "Gender"
        pubTermNumber(2) = "Number"
        pubTermCase(2) = "Case"
        pubTermArticle(2) = "Article"
        pubTermPreposition(2) = "Preposition"
        pubTermDouble(2) = "Double"
        pubTermAdjective(2) = "Adjective"
        pubTermAdverb(2) = "Adverb"
        pubTermComparison(2) = "Comparison"
        pubTermParticipe(2) = "Participe"
        pubTermPerson(2) = "Person"
        pubTermTime(2) = "Time"
        pubTermMode(2) = "Mode"
        pubTermGenusVerbi(2) = "Genus Verbi"
        pubTermSpecValence(2) = "Spec. Valence"
        ' Francais
        pubTermSentence(3) = "Phrase"
        pubTermJunction(3) = "Jonction"
        pubTermParticle(3) = "Particule"
        pubTermSubject(3) = "Sujet"
        pubTermPredicate(3) = "Verbe"
        pubTermObject(3) = "Complement"
        pubTermInterpunction(3) = "Ponctuation"
        pubTermQualities(3) = "Qualites"
        pubTermType(3) = "Type"
        pubTermGender(3) = "Sexe"
        pubTermNumber(3) = "Nombre"
        pubTermCase(3) = "Cas"
        pubTermArticle(3) = "Article"
        pubTermPreposition(3) = "Preposition"
        pubTermDouble(3) = "Double"
        pubTermAdjective(3) = "Adjectif"
        pubTermAdverb(3) = "Adverbe"
        pubTermComparison(3) = "Degres"
        pubTermParticipe(3) = "Participe"
        pubTermPerson(3) = "Personne"
        pubTermTime(3) = "Temps"
        pubTermMode(3) = "Mode"
        pubTermGenusVerbi(3) = "Genus Verbi"
        pubTermSpecValence(3) = "Spec. Valence"
        ' Espanol
        pubTermSentence(4) = "Oracion"
        pubTermJunction(4) = "Juncion"
        pubTermParticle(4) = "Particulo"
        pubTermSubject(4) = "Sujeto"
        pubTermPredicate(4) = "Predicado"
        pubTermObject(4) = "Objeto"
        pubTermInterpunction(4) = "Interpuncion"
        pubTermQualities(4) = "Propiedads"
        pubTermType(4) = "Tipo"
        pubTermGender(4) = "Sexo"
        pubTermNumber(4) = "Numero"
        pubTermCase(4) = "Caso"
        pubTermArticle(4) = "Articulo"
        pubTermPreposition(4) = "Preposicion"
        pubTermDouble(4) = "Duplicado"
        pubTermAdjective(4) = "Adjetivo"
        pubTermAdverb(4) = "Adverbio"
        pubTermComparison(4) = "Comparacion"
        pubTermParticipe(4) = "Participe"
        pubTermPerson(4) = "Persona"
        pubTermTime(4) = "Tiempo"
        pubTermMode(4) = "Modo"
        pubTermGenusVerbi(4) = "Genus Verbi"
        pubTermSpecValence(4) = "Spec. Valence"
        ' Italiano
        pubTermSentence(5) = "Frase"
        pubTermJunction(5) = "Giunzione"
        pubTermParticle(5) = "Particola"
        pubTermSubject(5) = "Soggetto"
        pubTermPredicate(5) = "Predicato"
        pubTermObject(5) = "Oggetto"
        pubTermInterpunction(5) = "Interpunzione"
        pubTermQualities(5) = "Qualite"
        pubTermType(5) = "Tipo"
        pubTermGender(5) = "Genere"
        pubTermNumber(5) = "Numero"
        pubTermCase(5) = "Caso"
        pubTermArticle(5) = "Articolo"
        pubTermPreposition(5) = "Preposizione"
        pubTermDouble(5) = "Duplicato"
        pubTermAdjective(5) = "Aggettivo"
        pubTermAdverb(5) = "Avverbio"
        pubTermComparison(5) = "Comparativo"
        pubTermParticipe(5) = "Participio"
        pubTermPerson(5) = "Persona"
        pubTermTime(5) = "Time"
        pubTermMode(5) = "Modo"
        pubTermGenusVerbi(5) = "Genus Verbi"
        pubTermSpecValence(5) = "Spec. Valence"
        ' Portoguese
        pubTermSentence(6) = "Frase"
        pubTermJunction(6) = "Junção"
        pubTermParticle(6) = "Partícula"
        pubTermSubject(6) = "Sujeito"
        pubTermPredicate(6) = "Predicado"
        pubTermObject(6) = "Objeto"
        pubTermInterpunction(6) = "Signal de Pontuação"
        pubTermQualities(6) = "Qualidades"
        pubTermType(6) = "Tipo"
        pubTermGender(6) = "Género"
        pubTermNumber(6) = "Numerus"
        pubTermCase(6) = "Caso"
        pubTermArticle(6) = "Artigo"
        pubTermPreposition(6) = "Preposiçion"
        pubTermDouble(6) = "Duplicado"
        pubTermAdjective(6) = "Adjectivo"
        pubTermAdverb(6) = "Advérbio"
        pubTermComparison(6) = "Comparação"
        pubTermParticipe(6) = "Particípio"
        pubTermPerson(6) = "Pessoa"
        pubTermTime(6) = "Tempo"
        pubTermMode(6) = "Modo"
        pubTermGenusVerbi(6) = "Genus Verbi"
        pubTermSpecValence(6) = "Spec. Valence"
        ' Dansk
        pubTermSentence(7) = "Sætning"
        pubTermJunction(7) = "Junktion"
        pubTermParticle(7) = "Småord"
        pubTermSubject(7) = "Subjekt"
        pubTermPredicate(7) = "Prædikat"
        pubTermObject(7) = "Objekt"
        pubTermInterpunction(7) = "Handler Maerker"
        pubTermQualities(7) = "Egenskaber"
        pubTermType(7) = "Type"
        pubTermGender(7) = "Fælleskøn"
        pubTermNumber(7) = "Antal"
        pubTermCase(7) = "Ejefald"
        pubTermArticle(7) = "Artikel"
        pubTermPreposition(7) = "Præposition"
        pubTermDouble(7) = "Dobbelt"
        pubTermAdjective(7) = "Adjektiv"
        pubTermAdverb(7) = "Adverbium"
        pubTermComparison(7) = "Komparation"
        pubTermParticipe(7) = "Participle"
        pubTermPerson(7) = "Person"
        pubTermTime(7) = "Tid"
        pubTermMode(7) = "Mode"
        pubTermGenusVerbi(7) = "Genus Verbi"
        pubTermSpecValence(7) = "Spec. Valence"
        ' Svenska
        pubTermSentence(8) = "Sats"
        pubTermJunction(8) = "Junktion"
        pubTermParticle(8) = "Partikel"
        pubTermSubject(8) = "Subjekt"
        pubTermPredicate(8) = "Predikat"
        pubTermObject(8) = "Objekt"
        pubTermInterpunction(8) = "Interpunktion"
        pubTermQualities(8) = "Egenskaper"
        pubTermType(8) = "Typ"
        pubTermGender(8) = "Genus"
        pubTermNumber(8) = "Antal"
        pubTermCase(8) = "Kasus"
        pubTermArticle(8) = "Artikel"
        pubTermPreposition(8) = "Preposition"
        pubTermDouble(8) = "Dublikat"
        pubTermAdjective(8) = "Adjektiv"
        pubTermAdverb(8) = "Adverb"
        pubTermComparison(8) = "Komparera"
        pubTermParticipe(8) = "Particip"
        pubTermPerson(8) = "Person"
        pubTermTime(8) = "Tid"
        pubTermMode(8) = "Modus"
        pubTermGenusVerbi(8) = "Genus Verbi"
        pubTermSpecValence(8) = "Spec. Valence"
        ' Ellenika
        pubTermSentence(9) = "Προταση"
        pubTermJunction(9) = "Συνδεσμος"
        pubTermParticle(9) = "Μοριο"
        pubTermSubject(9) = "Υποκειμενο"
        pubTermPredicate(9) = "Predicate"
        pubTermObject(9) = "Αντικειμενο"
        pubTermInterpunction(9) = "Σημειο Στιξης"
        pubTermQualities(9) = "Ιδιοτητες"
        pubTermType(9) = "Τυπος"
        pubTermGender(9) = "Γενος"
        pubTermNumber(9) = "Αριθμος"
        pubTermCase(9) = "Πτωση"
        pubTermArticle(9) = "Αρθρο"
        pubTermPreposition(9) = "Προθεση"
        pubTermDouble(9) = "Διπλος"
        pubTermAdjective(9) = "Επιθετο"
        pubTermAdverb(9) = "Επιρρημα"
        pubTermComparison(9) = "Σχηματισμος των Παραθετικων"
        pubTermParticipe(9) = "Μετοχη"
        pubTermPerson(9) = "Προσωπο"
        pubTermTime(9) = "Χρονος"
        pubTermMode(9) = "Εγκλιση"
        pubTermGenusVerbi(9) = "Γενος"
        pubTermSpecValence(9) = "Spec. Valence"
        ' Russkij
        pubTermSentence(10) = "Предложение"
        pubTermJunction(10) = "Соиоз"
        pubTermParticle(10) = "Частица"
        pubTermSubject(10) = "Подлежащее"
        pubTermPredicate(10) = "Сказуемое"
        pubTermObject(10) = "Дополнение"
        pubTermInterpunction(10) = "Знак Препинания"
        pubTermQualities(10) = "Качества"
        pubTermType(10) = "Тип"
        pubTermGender(10) = "Род"
        pubTermNumber(10) = "Число"
        pubTermCase(10) = "Падеж"
        pubTermArticle(10) = "Артикль"
        pubTermPreposition(10) = "Предлог"
        pubTermDouble(10) = "Дубликат"
        pubTermAdjective(10) = "Прилагательное"
        pubTermAdverb(10) = "Наречие"
        pubTermComparison(10) = "Образование"
        pubTermParticipe(10) = "Причастие"
        pubTermPerson(10) = "Персона"
        pubTermTime(10) = "Время"
        pubTermMode(10) = "Наклонение"
        pubTermGenusVerbi(10) = "Залог"
        pubTermSpecValence(10) = "Spec. Valence"
        ' Polski
        pubTermSentence(11) = "Zdanie"
        pubTermJunction(11) = "Spójnik"
        pubTermParticle(11) = "Particle"
        pubTermSubject(11) = "Podmiot"
        pubTermPredicate(11) = "Orzeczenie"
        pubTermObject(11) = "Dopełnienie"
        pubTermInterpunction(11) = "Interpunkcja"
        pubTermQualities(11) = "Wartość"
        pubTermType(11) = "Typ"
        pubTermGender(11) = "Rodzaj"
        pubTermNumber(11) = "Liczba"
        pubTermCase(11) = "Przypadek"
        pubTermArticle(11) = "Rodzajnik"
        pubTermPreposition(11) = "Przyimek"
        pubTermDouble(11) = "Odpis"
        pubTermAdjective(11) = "Przymiotnik"
        pubTermAdverb(11) = "Przysłówek"
        pubTermComparison(11) = "Stopniowanie"
        pubTermParticipe(11) = "Imiesłów"
        pubTermPerson(11) = "Osoba"
        pubTermTime(11) = "Czas"
        pubTermMode(11) = "Modus"
        pubTermGenusVerbi(11) = "Strona"
        pubTermSpecValence(11) = "Spec. Valence"
        ' Hrvatski
        pubTermSentence(12) = "Rečenica"
        pubTermJunction(12) = "Veznik"
        pubTermParticle(12) = "Čestica"
        pubTermSubject(12) = "Podmet"
        pubTermPredicate(12) = "Prirok"
        pubTermObject(12) = "Predmet"
        pubTermInterpunction(12) = "Interpunkcija"
        pubTermQualities(12) = "Osobine"
        pubTermType(12) = "Tip"
        pubTermGender(12) = "Rod"
        pubTermNumber(12) = "Broj"
        pubTermCase(12) = "Padež"
        pubTermArticle(12) = "Član"
        pubTermPreposition(12) = "Prijedlog"
        pubTermDouble(12) = "Duplikat"
        pubTermAdjective(12) = "Pridjev"
        pubTermAdverb(12) = "Prilog"
        pubTermComparison(12) = "Stupnjevanje"
        pubTermParticipe(12) = "Particip"
        pubTermPerson(12) = "Lice"
        pubTermTime(12) = "Vrijeme"
        pubTermMode(12) = "Modus"
        pubTermGenusVerbi(12) = "Genus Verbi"
        pubTermSpecValence(12) = "Spec. Valence"
        ' Any Language
        pubTermSentence(13) = "Sentence"
        pubTermJunction(13) = "Junction"
        pubTermParticle(13) = "Particle"
        pubTermSubject(13) = "Subject"
        pubTermPredicate(13) = "Predicate"
        pubTermObject(13) = "Object"
        pubTermInterpunction(13) = "Interpunction"
        pubTermQualities(13) = "Qualities"
        pubTermType(13) = "Type"
        pubTermGender(13) = "Gender"
        pubTermNumber(13) = "Number"
        pubTermCase(13) = "Case"
        pubTermArticle(13) = "Article"
        pubTermPreposition(13) = "Preposition"
        pubTermDouble(13) = "Double"
        pubTermAdjective(13) = "Adjective"
        pubTermAdverb(13) = "Adverb"
        pubTermComparison(13) = "Comparison"
        pubTermParticipe(13) = "Participe"
        pubTermPerson(13) = "Person"
        pubTermTime(13) = "Time"
        pubTermMode(13) = "Mode"
        pubTermGenusVerbi(13) = "Genus Verbi"
        pubTermSpecValence(13) = "Spec. Valence"


        nodeCount = 0
        ' Anzeige satzweise
        ' (Teil-)Satz
        For j = 1 To pubDataGrammar.countSentence
            sentenceNode(j) = frmEsperanto.TreeViewGrammatik.Nodes.Add(pubTermSentence(pubFromLanguage) & j.ToString)
            sentenceNode(j).Tag = "sentence" & Format(j, "00")
            ' Junktion
            For i = 1 To pubDataGrammar._Sentence(j)._numJunctions
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumJunctions
                strGer = pubDataGrammar._Junction(iCumSum)._Text
                nodeCount = nodeCount + 1
                gJunctionNode(i) = sentenceNode(j).Nodes.Add(pubTermJunction(pubFromLanguage) & ": " & strGer)
                gJunctionNode(i).Tag = "junction" & Format(iCumSum, "00")
                gJunctionNode(i).Name = nodeCount.ToString
            Next
            ' Partikel
            For i = 1 To pubDataGrammar._Sentence(j)._numParticles
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumParticles
                strGer = pubDataGrammar._Particle(iCumSum)._Text
                nodeCount = nodeCount + 1
                gParticleNode(i) = sentenceNode(j).Nodes.Add(pubTermParticle(pubFromLanguage) & ": " & strGer)
                gParticleNode(i).Tag = "particle" & Format(iCumSum, "00")
                gParticleNode(i).Name = nodeCount.ToString
            Next
            ' Subjekt
            For i = 1 To pubDataGrammar._Sentence(j)._numSubjects
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumSubjects
                strGer = pubDataGrammar._Subject(iCumSum)._Nominativ
                nodeCount = nodeCount + 1
                subjectNode(i) = sentenceNode(j).Nodes.Add(pubTermSubject(pubFromLanguage) & i.ToString & ": " & strGer)
                subjectNode(i).Tag = "subject" & Format(iCumSum, "00")
                subjectNode(i).Name = nodeCount.ToString
                subjectNode(i).ForeColor = Color.DarkRed
                ' Eigenschaften
                sComponentNode(iCumSum, 1) = subjectNode(i).Nodes.Add(pubTermQualities(pubFromLanguage))
                sComponentNode(iCumSum, 1).Tag = "subjProperties" & Format(iCumSum, "00")
                sComponentNode(iCumSum, 1).ForeColor = Color.DarkGoldenrod
                sComponentNode(iCumSum, 1).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._Type)
                sComponentNode(iCumSum, 1).Nodes.Add(pubTermGender(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._Genus)
                sComponentNode(iCumSum, 1).Nodes.Add(pubTermNumber(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._Number)
                sComponentNode(iCumSum, 1).Nodes.Add(pubTermArticle(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._Article)
                sComponentNode(iCumSum, 1).Nodes.Add(pubTermDouble(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._Duplicate)
                ' Adjektiv
                strGer = pubDataGrammar._Subject(iCumSum)._Adjective
                sComponentNode(iCumSum, 2) = subjectNode(i).Nodes.Add(pubTermAdjective(pubFromLanguage) & i.ToString & ": " & strGer)
                sComponentNode(iCumSum, 2).Tag = "subjAdjective" & Format(iCumSum, "00")
                sComponentNode(iCumSum, 2).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._AdjType)
                sComponentNode(iCumSum, 2).Nodes.Add(pubTermComparison(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._AdjKomp)
                ' Adverb
                strGer = pubDataGrammar._Subject(iCumSum)._Adverb
                sComponentNode(iCumSum, 3) = subjectNode(i).Nodes.Add(pubTermAdverb(pubFromLanguage) & i.ToString & ": " & strGer)
                sComponentNode(iCumSum, 3).Tag = "subjAdverb" & Format(iCumSum, "00")
                sComponentNode(iCumSum, 3).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._AdvType)
                sComponentNode(iCumSum, 3).Nodes.Add(pubTermComparison(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._AdvKomp)
                ' Partizip
                strGer = pubDataGrammar._Subject(iCumSum)._Participe
                sComponentNode(iCumSum, 4) = subjectNode(i).Nodes.Add(pubTermParticipe(pubFromLanguage) & i.ToString & ": " & strGer)
                sComponentNode(iCumSum, 4).Tag = "subjParticipe" & Format(iCumSum, "00")
                sComponentNode(iCumSum, 4).Nodes.Add(pubTermTime(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._ParTemp)
                sComponentNode(iCumSum, 4).Nodes.Add(pubTermMode(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._ParMod)
                sComponentNode(iCumSum, 4).Nodes.Add(pubTermGenusVerbi(pubFromLanguage) & ": " & pubDataGrammar._Subject(iCumSum)._ParGenV)
            Next
            ' Praedikat
            For i = 1 To pubDataGrammar._Sentence(j)._numPredicates
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumPredicates
                strGer = pubDataGrammar._Predicate(iCumSum)._Infinitiv
                nodeCount = nodeCount + 1
                predicateNode(i) = sentenceNode(j).Nodes.Add(pubTermPredicate(pubFromLanguage) & i.ToString & ": " & strGer)
                predicateNode(i).Tag = "predicate" & Format(iCumSum, "00")
                predicateNode(i).Name = nodeCount.ToString
                predicateNode(i).ForeColor = Color.DarkGreen
                ' Eigenschaften
                pComponentNode(iCumSum, 1) = predicateNode(i).Nodes.Add(pubTermQualities(pubFromLanguage))
                pComponentNode(iCumSum, 1).Tag = "predProperties" & Format(iCumSum, "00")
                pComponentNode(iCumSum, 1).ForeColor = Color.DarkGoldenrod
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermPerson(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._Person)
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermNumber(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._Number)
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermTime(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._Tempus)
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermMode(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._Modus)
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermGenusVerbi(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._GenusVerbi)
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermSpecValence(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._SpezValenz)
                pComponentNode(iCumSum, 1).Nodes.Add(pubTermDouble(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._Duplicate)
                ' Adverb
                strGer = pubDataGrammar._Predicate(iCumSum)._Adverb
                pComponentNode(iCumSum, 2) = predicateNode(i).Nodes.Add(pubTermAdverb(pubFromLanguage) & i.ToString & ": " & strGer)
                pComponentNode(iCumSum, 2).Tag = "predAdverb" & Format(iCumSum, "00")
                pComponentNode(iCumSum, 2).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._AdvType)
                pComponentNode(iCumSum, 2).Nodes.Add(pubTermComparison(pubFromLanguage) & ": " & pubDataGrammar._Predicate(iCumSum)._AdvKomp)
            Next
            ' Objekt
            For i = 1 To pubDataGrammar._Sentence(j)._numObjects
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumObjects
                strGer = pubDataGrammar._Object(iCumSum)._Nominativ
                nodeCount = nodeCount + 1
                objectNode(i) = sentenceNode(j).Nodes.Add(pubTermObject(pubFromLanguage) & i.ToString & ": " & strGer)
                objectNode(i).Tag = "object" & Format(iCumSum, "00")
                objectNode(i).Name = nodeCount.ToString
                objectNode(i).ForeColor = Color.DarkBlue
                ' Eigenschaften
                oComponentNode(iCumSum, 1) = objectNode(i).Nodes.Add(pubTermQualities(pubFromLanguage))
                oComponentNode(iCumSum, 1).Tag = "objProperties" & Format(iCumSum, "00")
                oComponentNode(iCumSum, 1).ForeColor = Color.DarkGoldenrod
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Type)
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermCase(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Case)
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermGender(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Genus)
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermNumber(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Number)
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermArticle(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Article)
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermPreposition(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Preposition)
                oComponentNode(iCumSum, 1).Nodes.Add(pubTermDouble(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._Duplicate)
                ' Adjektiv
                strGer = pubDataGrammar._Object(iCumSum)._Adjective
                oComponentNode(iCumSum, 2) = objectNode(i).Nodes.Add(pubTermAdjective(pubFromLanguage) & i.ToString & ": " & strGer)
                oComponentNode(iCumSum, 2).Tag = "objAdjective" & Format(iCumSum, "00")
                oComponentNode(iCumSum, 2).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._AdjType)
                oComponentNode(iCumSum, 2).Nodes.Add(pubTermComparison(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._AdjKomp)
                ' Adverb
                strGer = pubDataGrammar._Object(iCumSum)._Adverb
                oComponentNode(iCumSum, 3) = objectNode(i).Nodes.Add(pubTermAdverb(pubFromLanguage) & i.ToString & ": " & strGer)
                oComponentNode(iCumSum, 3).Tag = "objAdverb" & Format(iCumSum, "00")
                oComponentNode(iCumSum, 3).Nodes.Add(pubTermType(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._AdvType)
                oComponentNode(iCumSum, 3).Nodes.Add(pubTermComparison(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._AdvKomp)
                ' Partizip
                strGer = pubDataGrammar._Object(iCumSum)._Participe
                oComponentNode(iCumSum, 4) = objectNode(i).Nodes.Add(pubTermParticipe(pubFromLanguage) & i.ToString & ": " & strGer)
                oComponentNode(iCumSum, 4).Tag = "objParticipe" & Format(iCumSum, "00")
                oComponentNode(iCumSum, 4).Nodes.Add(pubTermTime(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._ParTemp)
                oComponentNode(iCumSum, 4).Nodes.Add(pubTermMode(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._ParMod)
                oComponentNode(iCumSum, 4).Nodes.Add(pubTermGenusVerbi(pubFromLanguage) & ": " & pubDataGrammar._Object(iCumSum)._ParGenV)
            Next
            ' Satzzeichen anhaengen
            For i = 1 To pubDataGrammar._Sentence(j)._numInterpuncts
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumInterpuncts
                strGer = pubDataGrammar._Interpunct(iCumSum)._Text
                nodeCount = nodeCount + 1
                interpunctNode(i) = sentenceNode(j).Nodes.Add(pubTermInterpunction(pubFromLanguage) & ": " & strGer)
                interpunctNode(i).Tag = "interpunct" & Format(iCumSum, "00")
                interpunctNode(i).Name = nodeCount.ToString
            Next
            ' Hauptbestandteile zeigen
            sentenceNode(j).Expand()
        Next

        ' Rueckgabe
        showGrammarAsTreeview = True

    End Function

    Public Function showNode(ByVal tagname As String, ByVal nodeHandle As TreeNode) As Boolean
        ' Display the selected TreeView-Node
        Dim number As Integer
        Dim locindex As Integer

        ' Tag-Nummer
        number = Int(Val(tagname.Substring(tagname.Length - 2, 2)))
        pubActiveNumber = number
        pubActiveNode = nodeHandle

        ' Fallunterscheidung
        If (tagname.StartsWith("sentence")) Then
            pubActiveNodeType = EleType.Sentence
            frmEsperanto.LabelEditElement.Text = "Original Sentence"
            frmEsperanto.TextBoxEditElement.Text = "Edit highlighted Original"
            frmEsperanto.RichTextBoxOriginal.BackColor = Color.PaleVioletRed
        ElseIf (tagname.StartsWith("junction")) Then
            pubActiveNodeType = EleType.Junction
            frmEsperanto.LabelEditElement.Text = "Junction"
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Junction(number)._Text
        ElseIf (tagname.StartsWith("particle")) Then
            pubActiveNodeType = EleType.Particle
            frmEsperanto.LabelEditElement.Text = "Particle"
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Particle(number)._Text
        ElseIf (tagname.StartsWith("subject")) Then
            pubActiveNodeType = EleType.Subject
            frmEsperanto.LabelEditElement.Text = "Subject"
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Subject(number)._Nominativ
        ElseIf (tagname.StartsWith("subjProperties")) Then
            pubActiveNodeType = EleType.SubjectProperties
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Subject Properties"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Gender"
            frmEsperanto.LabelProperty3.Text = "Number"
            frmEsperanto.LabelProperty4.Text = "Article"
            frmEsperanto.LabelProperty5.Text = "Double"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = ""
            frmEsperanto.ComboBoxProperty1.Items.Add("Pronoun")
            frmEsperanto.ComboBoxProperty1.Items.Add("Noun")
            frmEsperanto.ComboBoxProperty1.Items.Add("Name")
            frmEsperanto.ComboBoxProperty1.Items.Add("RelativePron")
            frmEsperanto.ComboBoxProperty2.Items.Add("male")
            frmEsperanto.ComboBoxProperty2.Items.Add("female")
            frmEsperanto.ComboBoxProperty2.Items.Add("neuter")
            frmEsperanto.ComboBoxProperty2.Items.Add("undetermined")
            frmEsperanto.ComboBoxProperty3.Items.Add("Singular")
            frmEsperanto.ComboBoxProperty3.Items.Add("Plural")
            frmEsperanto.ComboBoxProperty4.Items.Add("without")
            frmEsperanto.ComboBoxProperty4.Items.Add("with")
            ' Type
            Select Case pubDataGrammar._Subject(number)._Type
                Case "Pronomen"
                    locindex = 0
                Case "Nomen"
                    locindex = 1
                Case "Name"
                    locindex = 2
                Case "Relativpron"
                    locindex = 3
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Gender
            Select Case pubDataGrammar._Subject(number)._Genus
                Case "m"
                    locindex = 0
                Case "f"
                    locindex = 1
                Case "n"
                    locindex = 2
                Case "0"
                    locindex = 3
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
            ' Number
            Select Case pubDataGrammar._Subject(number)._Number
                Case "1"
                    locindex = 0
                Case "2"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty3.SelectedIndex = locindex
            ' Article
            Select Case pubDataGrammar._Subject(number)._Article
                Case "0"
                    locindex = 0
                Case "1"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty4.SelectedIndex = locindex
            ' Double
            frmEsperanto.ComboBoxProperty5.Text = pubDataGrammar._Subject(number)._Duplicate
        ElseIf (tagname.StartsWith("subjAdjective")) Then
            pubActiveNodeType = EleType.SubjectAdjective
            ' Lables
            frmEsperanto.LabelEditElement.Text = "Adjective of Subject"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Comparison"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Subject(number)._Adjective
            frmEsperanto.ComboBoxProperty1.Items.Add("Normal")
            frmEsperanto.ComboBoxProperty1.Items.Add("Possesive")
            frmEsperanto.ComboBoxProperty2.Items.Add("Positive")
            frmEsperanto.ComboBoxProperty2.Items.Add("1. Comparison")
            frmEsperanto.ComboBoxProperty2.Items.Add("2. Comparison")
            ' Type
            Select Case pubDataGrammar._Subject(number)._AdjType
                Case "Normal"
                    locindex = 0
                Case "Possesiv"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Comparison
            Select Case pubDataGrammar._Subject(number)._AdjKomp
                Case "Positiv"
                    locindex = 0
                Case "Komparativ"
                    locindex = 1
                Case "Superlativ"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("subjAdverb")) Then
            pubActiveNodeType = EleType.SubjectAdverb
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Adverb of Subject"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Comparison"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Subject(number)._Adverb
            frmEsperanto.ComboBoxProperty1.Items.Add("Original")
            frmEsperanto.ComboBoxProperty1.Items.Add("Derivat")
            frmEsperanto.ComboBoxProperty2.Items.Add("Positiv")
            frmEsperanto.ComboBoxProperty2.Items.Add("1. Comparison")
            frmEsperanto.ComboBoxProperty2.Items.Add("2. Comparison")
            ' Type
            Select Case pubDataGrammar._Subject(number)._AdvType
                Case "Original"
                    locindex = 0
                Case "Derivat"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Comparison
            Select Case pubDataGrammar._Subject(number)._AdvKomp
                Case "Positiv"
                    locindex = 0
                Case "Komparativ"
                    locindex = 1
                Case "Superlativ"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("subjParticipe")) Then
            pubActiveNodeType = EleType.SubjectParticipe
            ' Lables
            frmEsperanto.LabelEditElement.Text = "Participe of Subject"
            frmEsperanto.LabelProperty1.Text = "Time"
            frmEsperanto.LabelProperty2.Text = "Mode"
            frmEsperanto.LabelProperty3.Text = "Genus Verbi"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Subject(number)._Participe
            frmEsperanto.ComboBoxProperty1.Items.Add("Present")
            frmEsperanto.ComboBoxProperty1.Items.Add("Past")
            frmEsperanto.ComboBoxProperty1.Items.Add("Future")
            frmEsperanto.ComboBoxProperty2.Items.Add("Indicative")
            frmEsperanto.ComboBoxProperty2.Items.Add("Konjunctive")
            frmEsperanto.ComboBoxProperty3.Items.Add("Active")
            frmEsperanto.ComboBoxProperty3.Items.Add("Passive")
            ' Time
            Select Case pubDataGrammar._Subject(number)._ParTemp
                Case "Praesens"
                    locindex = 0
                Case "Praeteritum"
                    locindex = 1
                Case "Futur"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Mode
            Select Case pubDataGrammar._Subject(number)._ParMod
                Case "Indikativ"
                    locindex = 0
                Case "Konjunktiv"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
            ' Genus Verbi
            Select Case pubDataGrammar._Subject(number)._ParGenV
                Case "Aktiv"
                    locindex = 0
                Case "Passiv"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty3.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("predicate")) Then
            pubActiveNodeType = EleType.Predicate
            frmEsperanto.LabelEditElement.Text = "Predicate"
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Predicate(number)._Infinitiv
        ElseIf (tagname.StartsWith("predProperties")) Then
            pubActiveNodeType = EleType.PredicateProperties
            ' Lables
            frmEsperanto.LabelEditElement.Text = "Predicate Properties"
            frmEsperanto.LabelProperty1.Text = "Person"
            frmEsperanto.LabelProperty2.Text = "Number"
            frmEsperanto.LabelProperty3.Text = "Time"
            frmEsperanto.LabelProperty4.Text = "Mode"
            frmEsperanto.LabelProperty5.Text = "Genus Verbi"
            frmEsperanto.LabelProperty6.Text = "Spec. Valence"
            frmEsperanto.LabelProperty7.Text = "Double"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = ""
            frmEsperanto.ComboBoxProperty1.Items.Add("1st")
            frmEsperanto.ComboBoxProperty1.Items.Add("2nd")
            frmEsperanto.ComboBoxProperty1.Items.Add("3rd")
            frmEsperanto.ComboBoxProperty2.Items.Add("Singular")
            frmEsperanto.ComboBoxProperty2.Items.Add("Plural")
            frmEsperanto.ComboBoxProperty3.Items.Add("Present")
            frmEsperanto.ComboBoxProperty3.Items.Add("Past")
            frmEsperanto.ComboBoxProperty3.Items.Add("Future")
            frmEsperanto.ComboBoxProperty4.Items.Add("Indicative")
            frmEsperanto.ComboBoxProperty4.Items.Add("Konjunctive")
            frmEsperanto.ComboBoxProperty4.Items.Add("Imperative")
            frmEsperanto.ComboBoxProperty5.Items.Add("Active")
            frmEsperanto.ComboBoxProperty5.Items.Add("Passive")
            frmEsperanto.ComboBoxProperty5.Items.Add("Auxiliary Companion")
            frmEsperanto.ComboBoxProperty6.Items.Add("Intransitive")
            frmEsperanto.ComboBoxProperty6.Items.Add("Transitive")
            frmEsperanto.ComboBoxProperty6.Items.Add("Reflexive Form")
            frmEsperanto.ComboBoxProperty6.Items.Add("Auxiliary")
            ' Person
            Select Case pubDataGrammar._Predicate(number)._Person
                Case "1"
                    locindex = 0
                Case "2"
                    locindex = 1
                Case "3"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Number
            Select Case pubDataGrammar._Predicate(number)._Number
                Case "1"
                    locindex = 0
                Case "2"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
            ' Time
            Select Case pubDataGrammar._Predicate(number)._Tempus
                Case "Praesens"
                    locindex = 0
                Case "Praeteritum"
                    locindex = 1
                Case "Futur"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty3.SelectedIndex = locindex
            ' Mode
            Select Case pubDataGrammar._Predicate(number)._Modus
                Case "Indikativ"
                    locindex = 0
                Case "Konjunktiv"
                    locindex = 1
                Case "Imperativ"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty4.SelectedIndex = locindex
            ' Genus Verbi
            Select Case pubDataGrammar._Predicate(number)._GenusVerbi
                Case "Aktiv"
                    locindex = 0
                Case "Passiv"
                    locindex = 1
                Case "Auxiliarcomes"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty5.SelectedIndex = locindex
            ' Spec. Valence
            Select Case pubDataGrammar._Predicate(number)._SpezValenz
                Case "Intransitiv"
                    locindex = 0
                Case "Transitiv"
                    locindex = 1
                Case "Reflexiv"
                    locindex = 2
                Case "Auxiliarum"
                    locindex = 3
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty6.SelectedIndex = locindex
            ' Double
            frmEsperanto.ComboBoxProperty7.Text = pubDataGrammar._Predicate(number)._Duplicate
        ElseIf (tagname.StartsWith("predAdverb")) Then
            pubActiveNodeType = EleType.PredicateAdverb
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Adverb of Predicate"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Comparison"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Predicate(number)._Adverb
            frmEsperanto.ComboBoxProperty1.Items.Add("Original")
            frmEsperanto.ComboBoxProperty1.Items.Add("Derivat")
            frmEsperanto.ComboBoxProperty2.Items.Add("Positiv")
            frmEsperanto.ComboBoxProperty2.Items.Add("1. Comparison")
            frmEsperanto.ComboBoxProperty2.Items.Add("2. Comparison")
            ' Type
            Select Case pubDataGrammar._Predicate(number)._AdvType
                Case "Original"
                    locindex = 0
                Case "Derivat"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Comparison
            Select Case pubDataGrammar._Predicate(number)._AdvKomp
                Case "Positiv"
                    locindex = 0
                Case "Komparativ"
                    locindex = 1
                Case "Superlativ"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("object")) Then
            pubActiveNodeType = EleType.Objekt
            frmEsperanto.LabelEditElement.Text = "Object"
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Object(number)._Nominativ
        ElseIf (tagname.StartsWith("objProperties")) Then
            pubActiveNodeType = EleType.ObjectProperties
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Object Properties"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Case"
            frmEsperanto.LabelProperty3.Text = "Gender"
            frmEsperanto.LabelProperty4.Text = "Number"
            frmEsperanto.LabelProperty5.Text = "Article"
            frmEsperanto.LabelProperty6.Text = "Preposition"
            frmEsperanto.LabelProperty7.Text = "Double"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = ""
            frmEsperanto.ComboBoxProperty1.Items.Add("Pronoun")
            frmEsperanto.ComboBoxProperty1.Items.Add("Noun")
            frmEsperanto.ComboBoxProperty1.Items.Add("Name")
            frmEsperanto.ComboBoxProperty1.Items.Add("RelativePron")
            frmEsperanto.ComboBoxProperty2.Items.Add("Genitive")
            frmEsperanto.ComboBoxProperty2.Items.Add("Dative")
            frmEsperanto.ComboBoxProperty2.Items.Add("Accusative")
            frmEsperanto.ComboBoxProperty3.Items.Add("male")
            frmEsperanto.ComboBoxProperty3.Items.Add("female")
            frmEsperanto.ComboBoxProperty3.Items.Add("neuter")
            frmEsperanto.ComboBoxProperty3.Items.Add("undetermined")
            frmEsperanto.ComboBoxProperty4.Items.Add("Singular")
            frmEsperanto.ComboBoxProperty4.Items.Add("Plural")
            frmEsperanto.ComboBoxProperty5.Items.Add("without")
            frmEsperanto.ComboBoxProperty5.Items.Add("with")
            ' Type
            Select Case pubDataGrammar._Object(number)._Type
                Case "Pronomen"
                    locindex = 0
                Case "Nomen"
                    locindex = 1
                Case "Name"
                    locindex = 2
                Case "Relativpron"
                    locindex = 3
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Case
            Select Case pubDataGrammar._Object(number)._Case
                Case "2"
                    locindex = 0
                Case "3"
                    locindex = 1
                Case "4"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
            ' Gender
            Select Case pubDataGrammar._Object(number)._Genus
                Case "m"
                    locindex = 0
                Case "f"
                    locindex = 1
                Case "n"
                    locindex = 2
                Case "0"
                    locindex = 3
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty3.SelectedIndex = locindex
            ' Number
            Select Case pubDataGrammar._Object(number)._Number
                Case "1"
                    locindex = 0
                Case "2"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty4.SelectedIndex = locindex
            ' Article
            Select Case pubDataGrammar._Object(number)._Article
                Case "0"
                    locindex = 0
                Case "1"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty5.SelectedIndex = locindex
            ' Preposition
            frmEsperanto.ComboBoxProperty6.Text = pubDataGrammar._Object(number)._Preposition
            ' Double
            frmEsperanto.ComboBoxProperty7.Text = pubDataGrammar._Object(number)._Duplicate
        ElseIf (tagname.StartsWith("objAdjective")) Then
            pubActiveNodeType = EleType.ObjectAdjective
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Adjective of Object"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Comparison"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Object(number)._Adjective
            frmEsperanto.ComboBoxProperty1.Items.Add("Normal")
            frmEsperanto.ComboBoxProperty1.Items.Add("Possesive")
            frmEsperanto.ComboBoxProperty2.Items.Add("Positiv")
            frmEsperanto.ComboBoxProperty2.Items.Add("1. Comparison")
            frmEsperanto.ComboBoxProperty2.Items.Add("2. Comparison")
            ' Type
            Select Case pubDataGrammar._Object(number)._AdjType
                Case "Normal"
                    locindex = 0
                Case "Possesiv"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Comparison
            Select Case pubDataGrammar._Object(number)._AdjKomp
                Case "Positiv"
                    locindex = 0
                Case "Komparativ"
                    locindex = 1
                Case "Superlativ"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("objAdverb")) Then
            pubActiveNodeType = EleType.ObjectAdverb
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Adverb of Object"
            frmEsperanto.LabelProperty1.Text = "Type"
            frmEsperanto.LabelProperty2.Text = "Comparison"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Object(number)._Adverb
            frmEsperanto.ComboBoxProperty1.Items.Add("Original")
            frmEsperanto.ComboBoxProperty1.Items.Add("Derivat")
            frmEsperanto.ComboBoxProperty2.Items.Add("Positiv")
            frmEsperanto.ComboBoxProperty2.Items.Add("1. Comparison")
            frmEsperanto.ComboBoxProperty2.Items.Add("2. Comparison")
            ' Type
            Select Case pubDataGrammar._Object(number)._AdvType
                Case "Original"
                    locindex = 0
                Case "Derivat"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Comparison
            Select Case pubDataGrammar._Object(number)._AdvKomp
                Case "Positiv"
                    locindex = 0
                Case "Komparativ"
                    locindex = 1
                Case "Superlativ"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("objParticipe")) Then
            pubActiveNodeType = EleType.ObjectParticipe
            ' Labels
            frmEsperanto.LabelEditElement.Text = "Participe of Object"
            frmEsperanto.LabelProperty1.Text = "Time"
            frmEsperanto.LabelProperty2.Text = "Mode"
            frmEsperanto.LabelProperty3.Text = "Genus Verbi"
            ' ComboBoxes
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Object(number)._Participe
            frmEsperanto.ComboBoxProperty1.Items.Add("Present")
            frmEsperanto.ComboBoxProperty1.Items.Add("Past")
            frmEsperanto.ComboBoxProperty1.Items.Add("Future")
            frmEsperanto.ComboBoxProperty2.Items.Add("Indicative")
            frmEsperanto.ComboBoxProperty2.Items.Add("Konjunctive")
            frmEsperanto.ComboBoxProperty3.Items.Add("Active")
            frmEsperanto.ComboBoxProperty3.Items.Add("Passive")
            ' Time
            Select Case pubDataGrammar._Object(number)._ParTemp
                Case "Praesens"
                    locindex = 0
                Case "Praeteritum"
                    locindex = 1
                Case "Futur"
                    locindex = 2
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty1.SelectedIndex = locindex
            ' Mode
            Select Case pubDataGrammar._Object(number)._ParMod
                Case "Indikativ"
                    locindex = 0
                Case "Konjunktiv"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty2.SelectedIndex = locindex
            ' Genus Verbi
            Select Case pubDataGrammar._Object(number)._ParGenV
                Case "Aktiv"
                    locindex = 0
                Case "Passiv"
                    locindex = 1
                Case Else
                    locindex = -1
            End Select
            frmEsperanto.ComboBoxProperty3.SelectedIndex = locindex
        ElseIf (tagname.StartsWith("interpunct")) Then
            pubActiveNodeType = EleType.Interpunctuation
            frmEsperanto.LabelEditElement.Text = "Interpunctuation"
            frmEsperanto.TextBoxEditElement.Text = pubDataGrammar._Interpunct(number)._Text
        End If

        ' Rueckgabe
        showNode = True

    End Function

    Public Sub clearEdit(ByVal par As Integer)
        ' Clear of the Edit-Display

        frmEsperanto.LabelEditElement.Text = "T"
        frmEsperanto.LabelProperty1.Text = "1"
        frmEsperanto.LabelProperty2.Text = "2"
        frmEsperanto.LabelProperty3.Text = "3"
        frmEsperanto.LabelProperty4.Text = "4"
        frmEsperanto.LabelProperty5.Text = "5"
        frmEsperanto.LabelProperty6.Text = "6"
        frmEsperanto.LabelProperty7.Text = "7"
        frmEsperanto.TextBoxEditElement.Text = ""
        frmEsperanto.ComboBoxProperty1.Items.Clear()
        frmEsperanto.ComboBoxProperty2.Items.Clear()
        frmEsperanto.ComboBoxProperty3.Items.Clear()
        frmEsperanto.ComboBoxProperty4.Items.Clear()
        frmEsperanto.ComboBoxProperty5.Items.Clear()
        frmEsperanto.ComboBoxProperty6.Items.Clear()
        frmEsperanto.ComboBoxProperty7.Items.Clear()
        frmEsperanto.ComboBoxProperty1.Text = ""
        frmEsperanto.ComboBoxProperty2.Text = ""
        frmEsperanto.ComboBoxProperty3.Text = ""
        frmEsperanto.ComboBoxProperty4.Text = ""
        frmEsperanto.ComboBoxProperty5.Text = ""
        frmEsperanto.ComboBoxProperty6.Text = ""
        frmEsperanto.ComboBoxProperty7.Text = ""
        frmEsperanto.RichTextBoxOriginal.BackColor = Color.White

    End Sub

    Public Function saveNode(ByVal Par As Integer) As Boolean
        ' Internal Saving of the Edit-Display
        Dim titleStr As String
        Dim valueStr As String
        Dim locindex As Integer

        titleStr = ""

        ' Fallunterscheidung
        If (pubActiveNodeType = EleType.Sentence) Then
            ' Original Sentence
            valueStr = frmEsperanto.RichTextBoxOriginal.Text
            pubDataGrammar._Original = valueStr
            frmEsperanto.RichTextBoxOriginal.BackColor = Color.White
        ElseIf (pubActiveNodeType = EleType.Junction) Then
            ' Junction
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Junction(pubActiveNumber)._Text = valueStr
        ElseIf (pubActiveNodeType = EleType.Particle) Then
            ' Particle
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Particle(pubActiveNumber)._Text = valueStr
        ElseIf (pubActiveNodeType = EleType.Subject) Then
            ' Subject
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Nominativ = valueStr
        ElseIf (pubActiveNodeType = EleType.SubjectProperties) Then
            ' Subject Properties
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Pronomen"
                Case 1
                    valueStr = "Nomen"
                Case 2
                    valueStr = "Name"
                Case 3
                    valueStr = "Relativpron"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Type = valueStr
            ' Genus
            titleStr = pubTermGender(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "m"
                Case 1
                    valueStr = "f"
                Case 2
                    valueStr = "n"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Genus = valueStr
            ' Number
            titleStr = pubTermNumber(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty3.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "1"
                Case 1
                    valueStr = "2"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(2).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Number = valueStr
            ' Article
            titleStr = pubTermArticle(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty4.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "0"
                Case 1
                    valueStr = "1"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(3).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Article = valueStr
            ' Double
            titleStr = pubTermDouble(pubFromLanguage)
            valueStr = frmEsperanto.ComboBoxProperty5.Text
            pubActiveNode.Nodes(4).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Duplicate = valueStr
        ElseIf (pubActiveNodeType = EleType.SubjectAdjective) Then
            ' Adjective of Subject
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Adjective = valueStr
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Normal"
                Case 1
                    valueStr = "Possesiv"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._AdjType = valueStr
            ' Komparation
            titleStr = pubTermComparison(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Positiv"
                Case 1
                    valueStr = "Komparativ"
                Case 2
                    valueStr = "Superlativ"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._AdjKomp = valueStr
        ElseIf (pubActiveNodeType = EleType.SubjectAdverb) Then
            ' Adverb of Subject
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Adverb = valueStr
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Original"
                Case 1
                    valueStr = "Derivat"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._AdvType = valueStr
            ' Komparation
            titleStr = pubTermComparison(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Positiv"
                Case 1
                    valueStr = "Komparativ"
                Case 2
                    valueStr = "Superlativ"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._AdvKomp = valueStr
        ElseIf (pubActiveNodeType = EleType.SubjectParticipe) Then
            ' Participe of Subject
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._Participe = valueStr
            ' Tempus
            titleStr = pubTermTime(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Praesens"
                Case 1
                    valueStr = "Praeteritum"
                Case 2
                    valueStr = "Futur"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._ParTemp = valueStr
            ' Modus
            titleStr = pubTermMode(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Indikativ"
                Case 1
                    valueStr = "Konjunktiv"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._ParMod = valueStr
            ' Genus Verbi
            titleStr = pubTermGenusVerbi(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty3.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Aktiv"
                Case 1
                    valueStr = "Passiv"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(2).Text = titleStr & ": " & valueStr
            pubDataGrammar._Subject(pubActiveNumber)._ParGenV = valueStr
        ElseIf (pubActiveNodeType = EleType.Predicate) Then
            ' Predicate
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Infinitiv = valueStr
        ElseIf (pubActiveNodeType = EleType.PredicateProperties) Then
            ' Predicate Properties
            ' Person
            titleStr = pubTermPerson(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "1"
                Case 1
                    valueStr = "2"
                Case 2
                    valueStr = "3"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Person = valueStr
            ' Number
            titleStr = pubTermNumber(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "1"
                Case 1
                    valueStr = "2"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Number = valueStr
            ' Tempus
            titleStr = pubTermTime(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty3.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Praesens"
                Case 1
                    valueStr = "Praeteritum"
                Case 2
                    valueStr = "Futur"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(2).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Tempus = valueStr
            ' Modus
            titleStr = pubTermMode(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty4.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Indikativ"
                Case 1
                    valueStr = "Konjunktiv"
                Case 2
                    valueStr = "Imperativ"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(3).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Modus = valueStr
            ' Genus Verbi
            titleStr = pubTermGenusVerbi(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty5.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Aktiv"
                Case 1
                    valueStr = "Passiv"
                Case 2
                    valueStr = "Auxiliarcomes"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(4).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._GenusVerbi = valueStr
            ' Spez. Valenz
            titleStr = pubTermSpecValence(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty6.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Intransitiv"
                Case 1
                    valueStr = "Transitiv"
                Case 2
                    valueStr = "Reflexiv"
                Case 3
                    valueStr = "Auxiliarum"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(5).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._SpezValenz = valueStr
            ' Double
            titleStr = pubTermDouble(pubFromLanguage)
            valueStr = frmEsperanto.ComboBoxProperty7.Text
            pubActiveNode.Nodes(6).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Duplicate = valueStr
        ElseIf (pubActiveNodeType = EleType.PredicateAdverb) Then
            ' Adverb of Predicate
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._Adverb = valueStr
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Original"
                Case 1
                    valueStr = "Derivat"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._AdvType = valueStr
            ' Komparation
            titleStr = pubTermComparison(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Positiv"
                Case 1
                    valueStr = "Komparativ"
                Case 2
                    valueStr = "Superlativ"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Predicate(pubActiveNumber)._AdvKomp = valueStr
        ElseIf (pubActiveNodeType = EleType.Objekt) Then
            ' Object
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Nominativ = valueStr
        ElseIf (pubActiveNodeType = EleType.ObjectProperties) Then
            ' Object Properties
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Pronomen"
                Case 1
                    valueStr = "Nomen"
                Case 2
                    valueStr = "Name"
                Case 3
                    valueStr = "Relativpron"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Type = valueStr
            ' Kasus
            titleStr = pubTermCase(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "2"
                Case 1
                    valueStr = "3"
                Case 2
                    valueStr = "4"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Case = valueStr
            ' Genus
            titleStr = pubTermGender(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty3.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "m"
                Case 1
                    valueStr = "f"
                Case 2
                    valueStr = "n"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(2).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Genus = valueStr
            ' Number
            titleStr = pubTermNumber(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty4.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "1"
                Case 1
                    valueStr = "2"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(3).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Number = valueStr
            ' Article
            titleStr = pubTermArticle(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty5.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "0"
                Case 1
                    valueStr = "1"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(4).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Article = valueStr
            ' Preaposition
            titleStr = pubTermPreposition(pubFromLanguage)
            valueStr = frmEsperanto.ComboBoxProperty6.Text
            pubActiveNode.Nodes(5).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Preposition = valueStr
            ' Double
            titleStr = pubTermDouble(pubFromLanguage)
            valueStr = frmEsperanto.ComboBoxProperty7.Text
            pubActiveNode.Nodes(6).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Duplicate = valueStr
        ElseIf (pubActiveNodeType = EleType.ObjectAdjective) Then
            ' Adjective of Object
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Adjective = valueStr
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Normal"
                Case 1
                    valueStr = "Possesiv"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._AdjType = valueStr
            ' Komparation
            titleStr = pubTermComparison(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Positiv"
                Case 1
                    valueStr = "Komparativ"
                Case 2
                    valueStr = "Superlativ"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._AdjKomp = valueStr
        ElseIf (pubActiveNodeType = EleType.ObjectAdverb) Then
            ' Adverb of Object
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Adverb = valueStr
            ' Type
            titleStr = pubTermType(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Original"
                Case 1
                    valueStr = "Derivat"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._AdvType = valueStr
            ' Komparation
            titleStr = pubTermComparison(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Positiv"
                Case 1
                    valueStr = "Komparativ"
                Case 2
                    valueStr = "Superlativ"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._AdvKomp = valueStr
        ElseIf (pubActiveNodeType = EleType.ObjectParticipe) Then
            ' Participe of Object
            ' Text
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._Participe = valueStr
            ' Tempus
            titleStr = pubTermTime(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty1.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Praesens"
                Case 1
                    valueStr = "Praeteritum"
                Case 2
                    valueStr = "Futur"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(0).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._ParTemp = valueStr
            ' Modus
            titleStr = pubTermMode(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty2.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Indikativ"
                Case 1
                    valueStr = "Konjunktiv"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(1).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._ParMod = valueStr
            ' Genus Verbi
            titleStr = pubTermGenusVerbi(pubFromLanguage)
            locindex = frmEsperanto.ComboBoxProperty3.SelectedIndex
            Select Case locindex
                Case 0
                    valueStr = "Aktiv"
                Case 1
                    valueStr = "Passiv"
                Case Else
                    valueStr = ""
            End Select
            pubActiveNode.Nodes(2).Text = titleStr & ": " & valueStr
            pubDataGrammar._Object(pubActiveNumber)._ParGenV = valueStr
        ElseIf (pubActiveNodeType = EleType.Interpunctuation) Then
            ' Interpunctuation
            titleStr = pubActiveNode.Text
            titleStr = titleStr.Substring(0, titleStr.IndexOf(":"))
            valueStr = frmEsperanto.TextBoxEditElement.Text
            pubActiveNode.Text = titleStr & ": " & valueStr
            pubDataGrammar._Interpunct(pubActiveNumber)._Text = valueStr
        End If

        ' Rueckgabe
        saveNode = True

    End Function

    Public Function checkLanguage(ByVal par As Integer) As Integer
        ' Guess of probable Language by Test on Affixes
        Dim countDeu As Integer
        Dim countEng As Integer
        Dim countFra As Integer
        Dim countSpa As Integer
        Dim countIta As Integer
        Dim countPor As Integer
        Dim countDan As Integer
        Dim countSwe As Integer
        Dim countGre As Integer
        Dim countRus As Integer
        Dim countPol As Integer
        Dim countCro As Integer
        Dim countMax As Integer
        Dim indexMax As Integer
        Dim countVec(12) As Integer
        Dim maxCrit(12) As Integer
        Dim tmpstr As String
        Dim i As Integer
        Dim j As Integer
        Dim k As Integer

        ' Affixe
        pubLanguage(1) = "Deutsch"
        ' Deutsch Nomen-Suffixe
        pubDeuNomen(1) = "and"
        pubDeuNomen(2) = "ant"
        pubDeuNomen(3) = "ismus"
        pubDeuNomen(4) = "ist"
        pubDeuNomen(5) = "ling"
        pubDeuNomen(6) = "anz"
        pubDeuNomen(7) = "enz"
        pubDeuNomen(8) = "ei"
        pubDeuNomen(9) = "heit"
        pubDeuNomen(10) = "keit"
        pubDeuNomen(11) = "ik"
        pubDeuNomen(12) = "ität"
        pubDeuNomen(13) = "schaft"
        pubDeuNomen(14) = "ung"
        pubDeuNomen(15) = "ur"
        pubDeuNomen(16) = "chen"
        pubDeuNomen(17) = "lein"
        pubDeuNomen(18) = "um"
        ' Deutsch Verb-Praefixe
        pubDeuVerb(1) = "an"
        pubDeuVerb(2) = "auf"
        pubDeuVerb(3) = "aus"
        pubDeuVerb(4) = "be"
        pubDeuVerb(5) = "ent"
        pubDeuVerb(6) = "er"
        pubDeuVerb(7) = "miss"
        pubDeuVerb(8) = "ver"
        pubDeuVerb(9) = "zer"
        ' Deutsch Adjektiv-Suffixe
        pubDeuAdj(1) = "abel"
        pubDeuAdj(2) = "bar"
        pubDeuAdj(3) = "en"
        pubDeuAdj(4) = "ern"
        pubDeuAdj(5) = "haft"
        pubDeuAdj(6) = "ig"
        pubDeuAdj(7) = "isch"
        pubDeuAdj(8) = "lich"
        pubDeuAdj(9) = "los"
        pubDeuAdj(10) = "mäßig"
        pubDeuAdj(11) = "sam"

        pubLanguage(2) = "English"
        ' English Nomen-Suffixe
        pubEngNomen(1) = "an"
        pubEngNomen(2) = "cle"
        pubEngNomen(3) = "ing"
        pubEngNomen(4) = "ism"
        pubEngNomen(5) = "ity"
        pubEngNomen(6) = "ness"
        pubEngNomen(7) = "ow"
        ' English Verb-Praefixe
        pubEngVerb(1) = "con"
        pubEngVerb(2) = "de"
        pubEngVerb(3) = "dis"
        pubEngVerb(4) = "en"
        pubEngVerb(5) = "ex"
        pubEngVerb(6) = "im"
        pubEngVerb(7) = "mis"
        pubEngVerb(8) = "re"
        ' English Adjektiv-Suffixe
        pubEngAdj(1) = "able"
        pubEngAdj(2) = "ive"
        pubEngAdj(3) = "less"
        pubEngAdj(4) = "nal"
        pubEngAdj(5) = "ous"
        pubEngAdj(6) = "y"

        pubLanguage(3) = "Francais"
        ' Francais Nomen-Suffixe
        pubFraNomen(1) = "al"
        pubFraNomen(2) = "eau"
        pubFraNomen(3) = "et"
        pubFraNomen(4) = "ier"
        pubFraNomen(5) = "isme"
        pubFraNomen(6) = "oir"
        pubFraNomen(7) = "ee"
        pubFraNomen(8) = "elle"
        pubFraNomen(9) = "ette"
        pubFraNomen(10) = "ise"
        pubFraNomen(11) = "te"
        pubFraNomen(12) = "ure"
        pubFraNomen(13) = "aire"
        pubFraNomen(14) = "eur"
        pubFraNomen(15) = "gne"
        pubFraNomen(16) = "ien"
        pubFraNomen(17) = "ment"
        pubFraNomen(18) = "que"
        ' Francais Verb-Suffixe
        pubFraVerb(1) = "er"
        pubFraVerb(2) = "ir"
        pubFraVerb(3) = "oir"
        ' Francais Adjektiv-Suffixe
        pubFraAdj(1) = "ais"
        pubFraAdj(2) = "aire"
        pubFraAdj(3) = "aste"
        pubFraAdj(4) = "eau"
        pubFraAdj(5) = "eux"
        pubFraAdj(6) = "ier"
        pubFraAdj(7) = "if"
        pubFraAdj(8) = "onnel"
        pubFraAdj(9) = "oux"
        pubFraAdj(10) = "que"
        pubFraAdj(11) = "uel"

        pubLanguage(4) = "Espanol"
        ' Espanol Nomen-Suffixe
        pubSpaNomen(1) = "ado"
        pubSpaNomen(2) = "aje"
        pubSpaNomen(3) = "cia"
        pubSpaNomen(4) = "cion"
        pubSpaNomen(5) = "dad"
        pubSpaNomen(6) = "dor"
        pubSpaNomen(7) = "ero"
        pubSpaNomen(8) = "ez"
        pubSpaNomen(9) = "miento"
        pubSpaNomen(10) = "sion"
        pubSpaNomen(11) = "tad"
        pubSpaNomen(12) = "tud"
        ' Espanol Verb-Suffixe
        pubSpaVerb(1) = "ar"
        pubSpaVerb(2) = "er"
        pubSpaVerb(3) = "ir"
        pubSpaVerb(4) = "se"
        ' Espanol Adjektiv-Suffixe
        pubSpaAdj(1) = "an"
        pubSpaAdj(2) = "ca"
        pubSpaAdj(3) = "co"
        pubSpaAdj(4) = "dor"
        pubSpaAdj(5) = "in"
        pubSpaAdj(6) = "on"

        pubLanguage(5) = "Italiano"
        ' Italiano Nomen-Suffixe
        pubItaNomen(1) = "aio"
        pubItaNomen(2) = "ale"
        pubItaNomen(3) = "ano"
        pubItaNomen(4) = "co"
        pubItaNomen(5) = "ello"
        pubItaNomen(6) = "etto"
        pubItaNomen(7) = "go"
        pubItaNomen(8) = "iere"
        pubItaNomen(9) = "ile"
        pubItaNomen(10) = "me"
        pubItaNomen(11) = "one"
        pubItaNomen(12) = "ore"
        pubItaNomen(13) = "ca"
        pubItaNomen(14) = "etta"
        pubItaNomen(15) = "ga"
        pubItaNomen(16) = "iera"
        pubItaNomen(17) = "ice"
        pubItaNomen(18) = "ione"
        pubItaNomen(19) = "ista"
        ' Italiano Verb-Suffixe
        pubItaVerb(1) = "are"
        pubItaVerb(2) = "ere"
        pubItaVerb(3) = "ire"
        pubItaVerb(4) = "si"
        ' Italiano Adjektiv-Suffixe
        pubItaAdj(1) = "ale"
        pubItaAdj(2) = "ante"
        pubItaAdj(3) = "ato"
        pubItaAdj(4) = "co"
        pubItaAdj(5) = "ente"
        pubItaAdj(6) = "go"
        pubItaAdj(7) = "ile"
        pubItaAdj(8) = "neo"
        pubItaAdj(9) = "oso"
        pubItaAdj(10) = "sto"
        pubItaAdj(11) = "ivo"
        pubItaAdj(12) = "vole"

        pubLanguage(6) = "Portoguese"
        ' Portoguese Nomen-Suffixe
        pubPorNomen(1) = "ade"
        pubPorNomen(2) = "gem"
        pubPorNomen(3) = "ção"
        pubPorNomen(4) = "ice"
        ' Portoguese Verb-Suffixe
        pubPorVerb(1) = "ar"
        pubPorVerb(2) = "er"
        pubPorVerb(3) = "ir"
        pubPorVerb(4) = "se"
        ' Portoguese Adjektiv-Suffixe
        pubPorAdj(1) = "or"
        pubPorAdj(2) = "ol"
        pubPorAdj(3) = "uz"
        pubPorAdj(4) = "ês"
        pubPorAdj(5) = "ão"
        pubPorAdj(6) = "eu"

        pubLanguage(7) = "Dansk"
        ' Dansk Nomen-Suffixe
        pubDanNomen(1) = "hed"
        pubDanNomen(2) = "ing"
        pubDanNomen(3) = "isme"
        pubDanNomen(4) = "ling"
        pubDanNomen(5) = "skab"
        pubDanNomen(6) = "tet"
        ' Dansk Verb-Praefixe
        pubDanVerb(1) = "be"
        pubDanVerb(2) = "er"
        pubDanVerb(3) = "for"
        pubDanVerb(4) = "mis"
        pubDanVerb(5) = "op"
        pubDanVerb(6) = "til"
        pubDanVerb(7) = "ud"
        ' Dansk Adjektiv-Suffixe
        pubDanAdj(1) = "bar"
        pubDanAdj(2) = "ig"
        pubDanAdj(3) = "lig"
        pubDanAdj(4) = "løs"
        pubDanAdj(5) = "som"
        pubDanAdj(6) = "tig"

        pubLanguage(8) = "Sveska"
        ' Sveska Nomen-Suffixe
        pubSweNomen(1) = "het"
        pubSweNomen(2) = "ing"
        pubSweNomen(3) = "ism"
        pubSweNomen(4) = "ling"
        pubSweNomen(5) = "skap"
        pubSweNomen(6) = "tik"
        ' Sveska Verb-Praefixe
        pubSweVerb(1) = "be"
        pubSweVerb(2) = "er"
        pubSweVerb(3) = "för"
        pubSweVerb(4) = "miss"
        pubSweVerb(5) = "om"
        pubSweVerb(6) = "till"
        ' Sveska Adjektiv-Suffixe
        pubSweAdj(1) = "bar"
        pubSweAdj(2) = "ig"
        pubSweAdj(3) = "lig"
        pubSweAdj(4) = "lös"
        pubSweAdj(5) = "sam"
        pubSweAdj(6) = "tig"

        pubLanguage(9) = "Ellenika"
        ' Ellenika Nomen-Suffixe
        pubGreNomen(1) = "ης"
        pubGreNomen(2) = "ας"
        pubGreNomen(3) = "ος"
        pubGreNomen(4) = "εας"
        pubGreNomen(5) = "η"
        pubGreNomen(6) = "α"
        pubGreNomen(7) = "μα"
        ' Ellenika Verb-Suffixe
        pubGreVerb(1) = "ώ"
        pubGreVerb(2) = "ω"
        pubGreVerb(3) = "μαι"
        ' Ellenika Adjektiv-Suffixe
        pubGreAdj(1) = "ος"

        pubLanguage(10) = "Russkij"
        ' Russkij Nomen-Suffixe
        pubRusNomen(1) = "о"
        pubRusNomen(2) = "е"
        pubRusNomen(3) = "ё"
        pubRusNomen(4) = "а"
        pubRusNomen(5) = "я"
        pubRusNomen(6) = "ь"
        pubRusNomen(7) = "й"
        pubRusNomen(8) = "ство"
        pubRusNomen(9) = "ник"
        pubRusNomen(10) = "ность"
        ' Russkij Verb-Suffixe
        pubRusVerb(1) = "ть"
        pubRusVerb(2) = "ти"
        pubRusVerb(3) = "чь"
        pubRusVerb(4) = "ся"
        ' Russkij Adjektiv-Suffixe
        pubRusAdj(1) = "ий"
        pubRusAdj(2) = "ый"

        pubLanguage(11) = "Polski"
        ' Polski Nomen-Suffixe
        pubPolNomen(1) = "nie"
        pubPolNomen(2) = "nik"
        pubPolNomen(3) = "ość"
        ' Polski Verb-Suffixe
        pubPolVerb(1) = "ć"
        pubPolVerb(2) = "się"
        ' Polski Adjektiv-Suffixe
        pubPolAdj(1) = "y"
        pubPolAdj(2) = "i"

        pubLanguage(12) = "Hrvatski"
        ' Hrvatski Nomen-Suffixe
        pubCroNomen(1) = "ak"
        pubCroNomen(2) = "ka"
        pubCroNomen(3) = "nik"
        pubCroNomen(4) = "ost"
        ' Hrvatski Verb-Suffixe
        pubCroVerb(1) = "ati"
        pubCroVerb(2) = "eti"
        pubCroVerb(3) = "iti"
        pubCroVerb(4) = "uti"
        pubCroVerb(5) = "sti"
        pubCroVerb(6) = "ći"
        ' Hrvatski Adjektiv-Suffixe
        pubCroAdj(1) = "an"
        pubCroAdj(2) = "i"

        ' Init Counters
        countDeu = 0
        countEng = 0
        countFra = 0
        countSpa = 0
        countIta = 0
        countPor = 0
        countDan = 0
        countSwe = 0
        countGre = 0
        countRus = 0
        countPol = 0
        countCro = 0

        ' Erfassung der Kriterien
        For j = 1 To pubDataGrammar.countSentence
            ' Subjekte
            For i = 1 To pubDataGrammar._Sentence(j)._numSubjects
                ' Nomen
                tmpstr = pubDataGrammar._Subject(i)._Nominativ
                For k = 1 To 20
                    countDeu = countDeu + checkSuffix(tmpstr, pubDeuNomen(k))
                    countEng = countEng + checkSuffix(tmpstr, pubEngNomen(k))
                    countFra = countFra + checkSuffix(tmpstr, pubFraNomen(k))
                    countSpa = countSpa + checkSuffix(tmpstr, pubSpaNomen(k))
                    countIta = countIta + checkSuffix(tmpstr, pubItaNomen(k))
                    countPor = countPor + checkSuffix(tmpstr, pubPorNomen(k))
                    countDan = countDan + checkSuffix(tmpstr, pubDanNomen(k))
                    countSwe = countSwe + checkSuffix(tmpstr, pubSweNomen(k))
                    countGre = countGre + checkSuffix(tmpstr, pubGreNomen(k))
                    countRus = countRus + checkSuffix(tmpstr, pubRusNomen(k))
                    countPol = countPol + checkSuffix(tmpstr, pubPolNomen(k))
                    countCro = countCro + checkSuffix(tmpstr, pubCroNomen(k))
                Next
                ' Adjektive
                tmpstr = pubDataGrammar._Subject(i)._Adjective
                For k = 1 To 20
                    countDeu = countDeu + checkSuffix(tmpstr, pubDeuAdj(k))
                    countEng = countEng + checkSuffix(tmpstr, pubEngAdj(k))
                    countFra = countFra + checkSuffix(tmpstr, pubFraAdj(k))
                    countSpa = countSpa + checkSuffix(tmpstr, pubSpaAdj(k))
                    countIta = countIta + checkSuffix(tmpstr, pubItaAdj(k))
                    countPor = countPor + checkSuffix(tmpstr, pubPorAdj(k))
                    countDan = countDan + checkSuffix(tmpstr, pubDanAdj(k))
                    countSwe = countSwe + checkSuffix(tmpstr, pubSweAdj(k))
                    countGre = countGre + checkSuffix(tmpstr, pubGreAdj(k))
                    countRus = countRus + checkSuffix(tmpstr, pubRusAdj(k))
                    countPol = countPol + checkSuffix(tmpstr, pubPolAdj(k))
                    countCro = countCro + checkSuffix(tmpstr, pubCroAdj(k))
                Next
            Next
            ' Objekte
            For i = 1 To pubDataGrammar._Sentence(j)._numObjects
                ' Nomen
                tmpstr = pubDataGrammar._Object(i)._Nominativ
                For k = 1 To 20
                    countDeu = countDeu + checkSuffix(tmpstr, pubDeuNomen(k))
                    countEng = countEng + checkSuffix(tmpstr, pubEngNomen(k))
                    countFra = countFra + checkSuffix(tmpstr, pubFraNomen(k))
                    countSpa = countSpa + checkSuffix(tmpstr, pubSpaNomen(k))
                    countIta = countIta + checkSuffix(tmpstr, pubItaNomen(k))
                    countPor = countPor + checkSuffix(tmpstr, pubPorNomen(k))
                    countDan = countDan + checkSuffix(tmpstr, pubDanNomen(k))
                    countSwe = countSwe + checkSuffix(tmpstr, pubSweNomen(k))
                    countGre = countGre + checkSuffix(tmpstr, pubGreNomen(k))
                    countRus = countRus + checkSuffix(tmpstr, pubRusNomen(k))
                    countPol = countPol + checkSuffix(tmpstr, pubPolNomen(k))
                    countCro = countCro + checkSuffix(tmpstr, pubCroNomen(k))
                Next
                ' Adjektive
                tmpstr = pubDataGrammar._Object(i)._Adjective
                For k = 1 To 20
                    countDeu = countDeu + checkSuffix(tmpstr, pubDeuAdj(k))
                    countEng = countEng + checkSuffix(tmpstr, pubEngAdj(k))
                    countFra = countFra + checkSuffix(tmpstr, pubFraAdj(k))
                    countSpa = countSpa + checkSuffix(tmpstr, pubSpaAdj(k))
                    countIta = countIta + checkSuffix(tmpstr, pubItaAdj(k))
                    countPor = countPor + checkSuffix(tmpstr, pubPorAdj(k))
                    countDan = countDan + checkSuffix(tmpstr, pubDanAdj(k))
                    countSwe = countSwe + checkSuffix(tmpstr, pubSweAdj(k))
                    countGre = countGre + checkSuffix(tmpstr, pubGreAdj(k))
                    countRus = countRus + checkSuffix(tmpstr, pubRusAdj(k))
                    countPol = countPol + checkSuffix(tmpstr, pubPolAdj(k))
                    countCro = countCro + checkSuffix(tmpstr, pubCroAdj(k))
                Next
            Next
            ' Praedikate
            For i = 1 To pubDataGrammar._Sentence(j)._numPredicates
                ' Verben
                tmpstr = pubDataGrammar._Predicate(i)._Infinitiv
                For k = 1 To 10
                    countDeu = countDeu + checkPrefix(tmpstr, pubDeuVerb(k))
                    countEng = countEng + checkPrefix(tmpstr, pubEngVerb(k))
                    countFra = countFra + checkSuffix(tmpstr, pubFraVerb(k))
                    countSpa = countSpa + checkSuffix(tmpstr, pubSpaVerb(k))
                    countIta = countIta + checkSuffix(tmpstr, pubItaVerb(k))
                    countPor = countPor + checkSuffix(tmpstr, pubPorVerb(k))
                    countDan = countDan + checkPrefix(tmpstr, pubDanVerb(k))
                    countSwe = countSwe + checkPrefix(tmpstr, pubSweVerb(k))
                    countGre = countGre + checkSuffix(tmpstr, pubGreVerb(k))
                    countRus = countRus + checkSuffix(tmpstr, pubRusVerb(k))
                    countPol = countPol + checkSuffix(tmpstr, pubPolVerb(k))
                    countCro = countCro + checkPrefix(tmpstr, pubCroVerb(k))
                Next
            Next
        Next

        ' Auswertung
        countVec(1) = countDeu
        countVec(2) = countEng
        countVec(3) = countFra
        countVec(4) = countSpa
        countVec(5) = countIta
        countVec(6) = countPor
        countVec(7) = countDan
        countVec(8) = countSwe
        countVec(9) = countGre
        countVec(10) = countRus
        countVec(11) = countPol
        countVec(12) = countCro
        maxCrit = indexOfMaxOfPositivVector(countVec, 12)

        'MsgBox(countVec(1) & " " & countVec(2) & " " & countVec(3) & " " & countVec(4) & " " & countVec(5))
        'MsgBox(maxCrit(1) & " " & maxCrit(2) & " " & maxCrit(3) & " " & maxCrit(4) & " " & maxCrit(5))

        ' nur ein Peak ?
        countMax = 0
        indexMax = -1
        For i = 1 To 12
            If (maxCrit(i) > 0) Then
                countMax = countMax + 1
                indexMax = i
            End If
        Next

        ' Rueckgabe
        If (countMax = 1) Then
            checkLanguage = indexMax
        Else
            checkLanguage = -1
        End If

    End Function

    Private Function checkPrefix(ByVal dictWord As String, ByVal prefix As String) As Integer
        ' Test of a Vocabulary-Word on a Prefix

        ' Init
        checkPrefix = 0

        If (prefix <> "") Then
            If (dictWord.StartsWith(prefix) = True) Then
                checkPrefix = 1
            End If
        End If

    End Function

    Private Function checkSuffix(ByVal dictWord As String, ByVal suffix As String) As Integer
        ' Test of a Vocabulary-Word on a Suffix

        ' Init
        checkSuffix = 0

        If (suffix <> "") Then
            If (dictWord.EndsWith(suffix) = True) Then
                checkSuffix = 1
            End If
        End If

    End Function

    Public Function indexOfMaxOfPositivVector(ByVal vector() As Integer, ByVal size As Long) As Integer()
        ' Index of the Maximum in a Vector

        Dim tmpVector(12) As Integer
        Dim maxOfVector As Integer
        Dim i As Long

        ' Maximum
        maxOfVector = 0
        For i = 1 To size
            If (vector(i) > maxOfVector) Then
                maxOfVector = vector(i)
            End If
        Next

        ' Index
        For i = 1 To size
            If (vector(i) = maxOfVector) Then
                tmpVector(i) = 1
            End If
        Next

        ' Rueckgabe
        indexOfMaxOfPositivVector = tmpVector

    End Function

    Public Function checkMultiples(ByVal dictWord As String, ByVal VSyn As VSynonym) As String
        ' User Input for double Existence of a Word
        Dim tmpString As String
        Dim selString As String
        Dim selIndex As Integer
        Dim i As Integer

        ' Auswahl aufbauen
        tmpString = ""
        If (pubFromLanguage = LangName.Deutsch) Then
            tmpString = "Bitte Alternative wählen für " & dictWord
        ElseIf (pubFromLanguage = LangName.English) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Espanol) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Francais) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Italiano) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Portoguese) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Dansk) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Svenska) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Ellenika) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Russkij) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Polski) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.Hrvatski) Then
            tmpString = "Please select Alternative for " & dictWord
        ElseIf (pubFromLanguage = LangName.AnyLang) Then
            tmpString = "Please select Alternative for " & dictWord
        End If
        tmpString = tmpString & vbCrLf & " " & vbCrLf & "No Esperanto: Synonyme / Context"
        For i = 1 To VSyn._num
            tmpString = tmpString & vbCrLf & "(" & i.ToString & ") " & VSyn._Esp(i) & ": " & VSyn._Syn(i) & " / " & VSyn._Kon(i)
        Next
        ' Auswahl anzeigen
        selIndex = -1
        While (selIndex < 1 Or selIndex > VSyn._num)
            selString = InputBox(tmpString, "Ambiguities")
            If (selString = "") Then
                selIndex = 1
                Exit While
            End If
            selIndex = Int(Val(selString))
        End While
        ' gewaehltes Wort
        selString = VSyn._Syn(selIndex)
        ' entsprechend Esperanto
        selString = VSyn._Esp(selIndex)

        ' Rueckgabe
        checkMultiples = selString

    End Function

    Public Function lookForMultiples(ByVal language As LangName, ByVal dictWord As String, ByVal Type As WordType) As VSynonym
        ' Search double Existence of a Word (Ambiguities)
        Dim tmpSyn As VSynonym
        Dim tmpIndices(12) As Integer
        Dim strSyn(12) As String
        Dim strKon(12) As String
        Dim strEsp(12) As String
        Dim countInd As Integer
        Dim i As Integer

        If (Type = WordType.Pronomen) Then
            countInd = 0
            For i = 1 To countVocPronomen
                If (language = LangName.Deutsch And pubVocabularyPro(i)._GerPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.English And pubVocabularyPro(i)._EngPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Francais And pubVocabularyPro(i)._FraPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Espanol And pubVocabularyPro(i)._SpaPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Italiano And pubVocabularyPro(i)._ItaPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Portoguese And pubVocabularyPro(i)._PorPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Dansk And pubVocabularyPro(i)._DanPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Svenska And pubVocabularyPro(i)._SwePronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Ellenika And pubVocabularyPro(i)._GrePronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Russkij And pubVocabularyPro(i)._RusPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Polski And pubVocabularyPro(i)._PolPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.Hrvatski And pubVocabularyPro(i)._CroPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                ElseIf (language = LangName.AnyLang And pubVocabularyPro(i)._AnyPronomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPro(i)._SynPronomen
                    strKon(countInd) = pubVocabularyPro(i)._KonPronomen
                    strEsp(countInd) = pubVocabularyPro(i)._EspPronomen
                End If
            Next
        ElseIf (Type = WordType.Nomen) Then
            countInd = 0
            For i = 1 To countVocNomen
                If (language = LangName.Deutsch And pubVocabularyNom(i)._GerNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.English And pubVocabularyNom(i)._EngNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Francais And pubVocabularyNom(i)._FraNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Espanol And pubVocabularyNom(i)._SpaNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Italiano And pubVocabularyNom(i)._ItaNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Portoguese And pubVocabularyNom(i)._PorNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Dansk And pubVocabularyNom(i)._DanNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Svenska And pubVocabularyNom(i)._SweNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Ellenika And pubVocabularyNom(i)._GreNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Russkij And pubVocabularyNom(i)._RusNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Polski And pubVocabularyNom(i)._PolNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.Hrvatski And pubVocabularyNom(i)._CroNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                ElseIf (language = LangName.AnyLang And pubVocabularyNom(i)._AnyNomen = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyNom(i)._SynNomen
                    strKon(countInd) = pubVocabularyNom(i)._KonNomen
                    strEsp(countInd) = pubVocabularyNom(i)._EspNomen
                End If
            Next
        ElseIf (Type = WordType.Verb) Then
            countInd = 0
            For i = 1 To countVocVerb
                If (language = LangName.Deutsch And pubVocabularyVer(i)._GerVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.English And pubVocabularyVer(i)._EngVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Francais And pubVocabularyVer(i)._FraVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Espanol And pubVocabularyVer(i)._SpaVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Italiano And pubVocabularyVer(i)._ItaVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Portoguese And pubVocabularyVer(i)._PorVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Dansk And pubVocabularyVer(i)._DanVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Svenska And pubVocabularyVer(i)._SweVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Ellenika And pubVocabularyVer(i)._GreVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Russkij And pubVocabularyVer(i)._RusVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Polski And pubVocabularyVer(i)._PolVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.Hrvatski And pubVocabularyVer(i)._CroVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                ElseIf (language = LangName.AnyLang And pubVocabularyVer(i)._AnyVerb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyVer(i)._SynVerb
                    strKon(countInd) = pubVocabularyVer(i)._KonVerb
                    strEsp(countInd) = pubVocabularyVer(i)._EspVerb
                End If
            Next
        ElseIf (Type = WordType.Adverb) Then
            countInd = 0
            For i = 1 To countVocAdverb
                If (language = LangName.Deutsch And pubVocabularyAdv(i)._GerAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.English And pubVocabularyAdv(i)._EngAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Francais And pubVocabularyAdv(i)._FraAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Espanol And pubVocabularyAdv(i)._SpaAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Italiano And pubVocabularyAdv(i)._ItaAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Portoguese And pubVocabularyAdv(i)._PorAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Dansk And pubVocabularyAdv(i)._DanAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Svenska And pubVocabularyAdv(i)._SweAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Ellenika And pubVocabularyAdv(i)._GreAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Russkij And pubVocabularyAdv(i)._RusAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Polski And pubVocabularyAdv(i)._PolAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.Hrvatski And pubVocabularyAdv(i)._CroAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                ElseIf (language = LangName.AnyLang And pubVocabularyAdv(i)._AnyAdverb = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdv(i)._SynAdverb
                    strKon(countInd) = pubVocabularyAdv(i)._KonAdverb
                    strEsp(countInd) = pubVocabularyAdv(i)._EspAdverb
                End If
            Next
        ElseIf (Type = WordType.Adjective) Then
            countInd = 0
            For i = 1 To countVocAdjective
                If (language = LangName.Deutsch And pubVocabularyAdj(i)._GerAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.English And pubVocabularyAdj(i)._EngAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Francais And pubVocabularyAdj(i)._FraAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Espanol And pubVocabularyAdj(i)._SpaAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Italiano And pubVocabularyAdj(i)._ItaAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Portoguese And pubVocabularyAdj(i)._PorAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Dansk And pubVocabularyAdj(i)._DanAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Svenska And pubVocabularyAdj(i)._SweAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Ellenika And pubVocabularyAdj(i)._GreAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Russkij And pubVocabularyAdj(i)._RusAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Polski And pubVocabularyAdj(i)._PolAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.Hrvatski And pubVocabularyAdj(i)._CroAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                ElseIf (language = LangName.AnyLang And pubVocabularyAdj(i)._AnyAdjective = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyAdj(i)._SynAdjective
                    strKon(countInd) = pubVocabularyAdj(i)._KonAdjective
                    strEsp(countInd) = pubVocabularyAdj(i)._EspAdjective
                End If
            Next
        ElseIf (Type = WordType.Preposition) Then
            countInd = 0
            For i = 1 To countVocPreposition
                If (language = LangName.Deutsch And pubVocabularyPre(i)._GerPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.English And pubVocabularyPre(i)._EngPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Francais And pubVocabularyPre(i)._FraPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Espanol And pubVocabularyPre(i)._SpaPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Italiano And pubVocabularyPre(i)._ItaPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Portoguese And pubVocabularyPre(i)._PorPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Dansk And pubVocabularyPre(i)._DanPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Svenska And pubVocabularyPre(i)._SwePreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Ellenika And pubVocabularyPre(i)._GrePreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Russkij And pubVocabularyPre(i)._RusPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Polski And pubVocabularyPre(i)._PolPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.Hrvatski And pubVocabularyPre(i)._CroPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                ElseIf (language = LangName.AnyLang And pubVocabularyPre(i)._AnyPreposition = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPre(i)._SynPreposition
                    strKon(countInd) = pubVocabularyPre(i)._KonPreposition
                    strEsp(countInd) = pubVocabularyPre(i)._EspPreposition
                End If
            Next
        ElseIf (Type = WordType.Particle) Then
            countInd = 0
            For i = 1 To countVocParticle
                If (language = LangName.Deutsch And pubVocabularyPar(i)._GerParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.English And pubVocabularyPar(i)._EngParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Francais And pubVocabularyPar(i)._FraParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Espanol And pubVocabularyPar(i)._SpaParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Italiano And pubVocabularyPar(i)._ItaParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Portoguese And pubVocabularyPar(i)._PorParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Dansk And pubVocabularyPar(i)._DanParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Svenska And pubVocabularyPar(i)._SweParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Ellenika And pubVocabularyPar(i)._GreParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Russkij And pubVocabularyPar(i)._RusParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Polski And pubVocabularyPar(i)._PolParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.Hrvatski And pubVocabularyPar(i)._CroParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                ElseIf (language = LangName.AnyLang And pubVocabularyPar(i)._AnyParticle = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyPar(i)._SynParticle
                    strKon(countInd) = pubVocabularyPar(i)._KonParticle
                    strEsp(countInd) = pubVocabularyPar(i)._EspParticle
                End If
            Next
        ElseIf (Type = WordType.Junction) Then
            countInd = 0
            For i = 1 To countVocJunction
                If (language = LangName.Deutsch And pubVocabularyJun(i)._GerJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.English And pubVocabularyJun(i)._EngJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Francais And pubVocabularyJun(i)._FraJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Espanol And pubVocabularyJun(i)._SpaJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Italiano And pubVocabularyJun(i)._ItaJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Portoguese And pubVocabularyJun(i)._PorJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Dansk And pubVocabularyJun(i)._DanJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Svenska And pubVocabularyJun(i)._SweJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Ellenika And pubVocabularyJun(i)._GreJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Russkij And pubVocabularyJun(i)._RusJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Polski And pubVocabularyJun(i)._PolJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.Hrvatski And pubVocabularyJun(i)._CroJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                ElseIf (language = LangName.AnyLang And pubVocabularyJun(i)._AnyJunction = dictWord) Then
                    countInd = countInd + 1
                    tmpIndices(countInd) = i
                    strSyn(countInd) = pubVocabularyJun(i)._SynJunction
                    strKon(countInd) = pubVocabularyJun(i)._KonJunction
                    strEsp(countInd) = pubVocabularyJun(i)._EspJunction
                End If
            Next
        End If

        ' Datenpaket
        tmpSyn._num = countInd
        tmpSyn._Indices = tmpIndices
        tmpSyn._Syn = strSyn
        tmpSyn._Kon = strKon
        tmpSyn._Esp = strEsp

        ' Rueckgabe
        lookForMultiples = tmpSyn

    End Function

    Public Function writeGrammar(ByVal xmlFile As String) As Boolean
        ' Write the XML-Coding of a Sentence

        Dim fid As Integer
        Dim iCumSum As Integer
        Dim i As Integer
        Dim j As Integer

        fid = FreeFile()
        FileOpen(fid, xmlFile, OpenMode.Output)

        PrintLine(fid, "<?xml version='1.0'?>")
        PrintLine(fid, "<!--Esperanto: Grammatik-->")
        PrintLine(fid, "<!--Esperanto: export-->")
        PrintLine(fid, "<Esperanto xmlns:esp='http://www.esperanto.de'>")
        PrintLine(fid, "	<Original>" & pubDataGrammar._Original & "</Original>")
        For j = 1 To pubDataGrammar.countSentence
            PrintLine(fid, "	<Sentence No='" & j.ToString & "'>")
            ' Junktionen
            For i = 1 To pubDataGrammar._Sentence(j)._cumNumJunctions
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumJunctions
                PrintLine(fid, "		<Junktion No='" & i.ToString & "'>")
                PrintLine(fid, "			<JunText>" & pubDataGrammar._Junction(iCumSum)._Text & "</JunText>")
                PrintLine(fid, "			<JunType>" & pubDataGrammar._Junction(iCumSum)._Type & "</JunType>")
                PrintLine(fid, "		</Junktion>")
            Next
            ' Partikeln
            For i = 1 To pubDataGrammar._Sentence(j)._cumNumParticles
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumParticles
                PrintLine(fid, "		<Partikel No='" & i.ToString & "'>")
                PrintLine(fid, "			<ParText>" & pubDataGrammar._Particle(iCumSum)._Text & "</ParText>")
                PrintLine(fid, "			<ParType>" & pubDataGrammar._Particle(iCumSum)._Type & "</ParType>")
                PrintLine(fid, "		</Partikel>")
            Next
            ' Subjekte
            For i = 1 To pubDataGrammar._Sentence(j)._numSubjects
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumSubjects
                PrintLine(fid, "		<Subjekt No='" & i.ToString & "'>")
                PrintLine(fid, "			<SubNominativ>" & pubDataGrammar._Subject(iCumSum)._Nominativ & "</SubNominativ>")
                PrintLine(fid, "			<SubType>" & pubDataGrammar._Subject(iCumSum)._Type & "</SubType>")
                PrintLine(fid, "			<SubGenus>" & pubDataGrammar._Subject(iCumSum)._Genus & "</SubGenus>")
                PrintLine(fid, "			<SubNumerus>" & pubDataGrammar._Subject(iCumSum)._Number & "</SubNumerus>")
                PrintLine(fid, "			<SubArtikel>" & pubDataGrammar._Subject(iCumSum)._Article & "</SubArtikel>")
                PrintLine(fid, "			<SubAdjektiv>" & pubDataGrammar._Subject(iCumSum)._Adjective & "</SubAdjektiv>")
                PrintLine(fid, "			<SubAdjType>" & pubDataGrammar._Subject(iCumSum)._AdjType & "</SubAdjType>")
                PrintLine(fid, "			<SubAdjKomp>" & pubDataGrammar._Subject(iCumSum)._AdjKomp & "</SubAdjKomp>")
                PrintLine(fid, "			<SubAdverb>" & pubDataGrammar._Subject(iCumSum)._Adverb & "</SubAdverb>")
                PrintLine(fid, "			<SubAdvType>" & pubDataGrammar._Subject(iCumSum)._AdvType & "</SubAdvType>")
                PrintLine(fid, "			<SubAdvKomp>" & pubDataGrammar._Subject(iCumSum)._AdvKomp & "</SubAdvKomp>")
                PrintLine(fid, "			<SubPartizip>" & pubDataGrammar._Subject(iCumSum)._Participe & "</SubPartizip>")
                PrintLine(fid, "			<SubParTemp>" & pubDataGrammar._Subject(iCumSum)._ParTemp & "</SubParTemp>")
                PrintLine(fid, "			<SubParMod>" & pubDataGrammar._Subject(iCumSum)._ParMod & "</SubParMod>")
                PrintLine(fid, "			<SubParGenV>" & pubDataGrammar._Subject(iCumSum)._ParGenV & "</SubParGenV>")
                PrintLine(fid, "			<SubDuplikat>" & pubDataGrammar._Subject(iCumSum)._Duplicate & "</SubDuplikat>")
                PrintLine(fid, "		</Subjekt>")
            Next
            ' Praedikate
            For i = 1 To pubDataGrammar._Sentence(j)._numPredicates
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumPredicates
                PrintLine(fid, "		<Preadikat No='" & i.ToString & "'>")
                PrintLine(fid, "			<PreInfinitiv>" & pubDataGrammar._Predicate(iCumSum)._Infinitiv & "</PreInfinitiv>")
                PrintLine(fid, "			<PrePerson>" & pubDataGrammar._Predicate(iCumSum)._Person & "</PrePerson>")
                PrintLine(fid, "			<PreNumerus>" & pubDataGrammar._Predicate(iCumSum)._Number & "</PreNumerus>")
                PrintLine(fid, "			<PreTempus>" & pubDataGrammar._Predicate(iCumSum)._Tempus & "</PreTempus>")
                PrintLine(fid, "			<PreModus>" & pubDataGrammar._Predicate(iCumSum)._Modus & "</PreModus>")
                PrintLine(fid, "			<PreGenusVerbi>" & pubDataGrammar._Predicate(iCumSum)._GenusVerbi & "</PreGenusVerbi>")
                PrintLine(fid, "			<PreSpezValenz>" & pubDataGrammar._Predicate(iCumSum)._SpezValenz & "</PreSpezValenz>")
                PrintLine(fid, "			<PreAdverb>" & pubDataGrammar._Predicate(iCumSum)._Adverb & "</PreAdverb>")
                PrintLine(fid, "			<PreAdvType>" & pubDataGrammar._Predicate(iCumSum)._AdvType & "</PreAdvType>")
                PrintLine(fid, "			<PreAdvKomp>" & pubDataGrammar._Predicate(iCumSum)._AdvKomp & "</PreAdvKomp>")
                PrintLine(fid, "			<PreDuplikat>" & pubDataGrammar._Predicate(iCumSum)._Duplicate & "</PreDuplikat>")
                PrintLine(fid, "		</Preadikat>")
            Next
            ' Objekte
            For i = 1 To pubDataGrammar._Sentence(j)._numObjects
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumObjects
                PrintLine(fid, "		<Objekt No='" & i.ToString & "'>")
                PrintLine(fid, "			<ObjNominativ>" & pubDataGrammar._Object(iCumSum)._Nominativ & "</ObjNominativ>")
                PrintLine(fid, "			<ObjType>" & pubDataGrammar._Object(iCumSum)._Type & "</ObjType>")
                PrintLine(fid, "			<ObjKasus>" & pubDataGrammar._Object(iCumSum)._Case & "</ObjKasus>")
                PrintLine(fid, "			<ObjGenus>" & pubDataGrammar._Object(iCumSum)._Genus & "</ObjGenus>")
                PrintLine(fid, "			<ObjNumerus>" & pubDataGrammar._Object(iCumSum)._Number & "</ObjNumerus>")
                PrintLine(fid, "			<ObjArtikel>" & pubDataGrammar._Object(iCumSum)._Article & "</ObjArtikel>")
                PrintLine(fid, "			<ObjAdjektiv>" & pubDataGrammar._Object(iCumSum)._Adjective & "</ObjAdjektiv>")
                PrintLine(fid, "			<ObjAdjType>" & pubDataGrammar._Object(iCumSum)._AdjType & "</ObjAdjType>")
                PrintLine(fid, "			<ObjAdjKomp>" & pubDataGrammar._Object(iCumSum)._AdjKomp & "</ObjAdjKomp>")
                PrintLine(fid, "			<ObjAdverb>" & pubDataGrammar._Object(iCumSum)._Adverb & "</ObjAdverb>")
                PrintLine(fid, "			<ObjAdvType>" & pubDataGrammar._Object(iCumSum)._AdvType & "</ObjAdvType>")
                PrintLine(fid, "			<ObjAdvKomp>" & pubDataGrammar._Object(iCumSum)._AdvKomp & "</ObjAdvKomp>")
                PrintLine(fid, "			<ObjPartizip>" & pubDataGrammar._Object(iCumSum)._Participe & "</ObjPartizip>")
                PrintLine(fid, "			<ObjParTemp>" & pubDataGrammar._Object(iCumSum)._ParTemp & "</ObjParTemp>")
                PrintLine(fid, "			<ObjParMod>" & pubDataGrammar._Object(iCumSum)._ParMod & "</ObjParMod>")
                PrintLine(fid, "			<ObjParGenV>" & pubDataGrammar._Object(iCumSum)._ParGenV & "</ObjParGenV>")
                PrintLine(fid, "			<ObjPraeposition>" & pubDataGrammar._Object(iCumSum)._Preposition & "</ObjPraeposition>")
                PrintLine(fid, "			<ObjDuplikat>" & pubDataGrammar._Object(iCumSum)._Duplicate & "</ObjDuplikat>")
                PrintLine(fid, "		</Objekt>")
            Next
            ' Satzzeichen
            For i = 1 To pubDataGrammar._Sentence(j)._numInterpuncts
                iCumSum = i + pubDataGrammar._Sentence(j)._cumNumInterpuncts
                PrintLine(fid, "		<Interpunktion No='" & i.ToString & "'>")
                PrintLine(fid, "			<IntText>" & pubDataGrammar._Interpunct(iCumSum)._Text & "</IntText>")
                PrintLine(fid, "			<IntType>" & pubDataGrammar._Interpunct(iCumSum)._Type & "</IntType>")
                PrintLine(fid, "		</Interpunktion>")
            Next
            PrintLine(fid, "	</Sentence>")
        Next
        PrintLine(fid, "</Esperanto>")

        FileClose(fid)

        ' Rueckgabe
        writeGrammar = True

    End Function

    Function readVocabulary(ByVal fileType As String) As Boolean
        ' Read the XML-coded Vocabulary (standard and extra)
        Dim espDOM As New XmlDocument
        Dim numPronomen As XmlNodeList
        Dim numNomen As XmlNodeList
        Dim numVerb As XmlNodeList
        Dim numAdverb As XmlNodeList
        Dim numAdjective As XmlNodeList
        Dim numPreposition As XmlNodeList
        Dim numParticle As XmlNodeList
        Dim numKonjunction As XmlNodeList
        Dim numExpression As XmlNodeList
        Dim numCooccurrence As XmlNodeList
        Dim numGroup As XmlNodeList
        Dim data01DOM As XmlNodeList
        Dim data02DOM As XmlNodeList
        Dim data03DOM As XmlNodeList
        Dim data04DOM As XmlNodeList
        Dim data05DOM As XmlNodeList
        Dim data06DOM As XmlNodeList
        Dim data07DOM As XmlNodeList
        Dim data08DOM As XmlNodeList
        Dim data09DOM As XmlNodeList
        Dim data10DOM As XmlNodeList
        Dim data11DOM As XmlNodeList
        Dim data12DOM As XmlNodeList
        Dim data13DOM As XmlNodeList
        Dim data14DOM As XmlNodeList
        Dim data15DOM As XmlNodeList
        Dim data16DOM As XmlNodeList
        'Dim xmlFile As String
        Dim sumOfAll As Integer
        Dim i As Integer
        Dim j As Integer
        Dim s As Integer
        Dim tmpVocPronomen As New clsVocabularyPro
        Dim tmpVocNomen As New clsVocabularyNom
        Dim tmpVocVerb As New clsVocabularyVer
        Dim tmpVocAdverb As New clsVocabularyAdv
        Dim tmpVocAdjective As New clsVocabularyAdj
        Dim tmpVocPreposition As New clsVocabularyPre
        Dim tmpVocParticle As New clsVocabularyPar
        Dim tmpVocJunction As New clsVocabularyJun
        Dim tmpVocExpression As New clsVocabularyExp
        Dim tmpVocCooccurrence As New clsVocabularyCoo
        Dim tmpVocGroup As New clsVocabularyGrp

        ' Rueckgabe
        readVocabulary = False

        ' Zugriff
        If (fileType = "standard") Then
            ' Standard Vocabulary (A1/A2/B1/B2)
            Try
                espDOM.Load(pubVocabularyFile)
                _isVocDone = True
            Catch
                _isVocDone = False
                MsgBox("File " & pubVocabularyFile & " could not be read (" & Err.Description & ")", vbCritical, "Standard Vocabulary")
                readVocabulary = False
                Exit Function

            End Try

        ElseIf (fileType = "addition") Then
            ' Additional Vocabulary (A1/A2/B1/B2/C1/C2)
            Try
                espDOM.Load(pubVocabularyFile2)
                _isVocDone = True
            Catch
                _isVocDone = False
                MsgBox("File " & pubVocabularyFile2 & " could not be read (" & Err.Description & ")", vbCritical, "Additional Vocabulary")
                readVocabulary = False
                Exit Function

            End Try

        ElseIf (fileType = "addition2") Then
            ' Additional Vocabulary (B1/B2/C1/C2)
            Try
                espDOM.Load(pubVocabularyFile3)
                _isVocDone = True
            Catch
                _isVocDone = False
                MsgBox("File " & pubVocabularyFile3 & " could not be read (" & Err.Description & ")", vbCritical, "Additional Vocabulary (2)")
                readVocabulary = False
                Exit Function

            End Try

        ElseIf (fileType = "addition3") Then
            ' Additional Vocabulary (A1/A2/B1/B2/C1/C2)
            Try
                espDOM.Load(pubVocabularyFile4)
                _isVocDone = True
            Catch
                _isVocDone = False
                MsgBox("File " & pubVocabularyFile4 & " could not be read (" & Err.Description & ")", vbCritical, "Additional Vocabulary (3)")
                readVocabulary = False
                Exit Function

            End Try

        ElseIf (fileType = "cooccurrence") Then
            ' Additional Vocabulary (A1/A2/B1/B2)
            Try
                espDOM.Load(pubVocabularyFile5)
                _isVocDone = True
            Catch
                _isVocDone = False
                MsgBox("File " & pubVocabularyFile5 & " could not be read (" & Err.Description & ")", vbCritical, "Cooccurr Vocabulary")
                readVocabulary = False
                Exit Function

            End Try

        ElseIf (fileType = "extra") Then
            ' Extra Technical Vocabulary (EX:20Parts)
            Try
                espDOM.Load(pubVocabularyExt)
                _isVocDone = True
            Catch
                _isVocDone = False
                MsgBox("File " & pubVocabularyExt & " could not be read (" & Err.Description & ")", vbCritical, "Extra Vocabulary")
                readVocabulary = False
                Exit Function

            End Try

        End If

        ' Zaehlerstand Merken
        countVocBasPronomen = countVocPronomen
        countVocBasNomen = countVocNomen
        countVocBasVerb = countVocVerb
        countVocBasAdjective = countVocAdjective
        countVocBasAdverb = countVocAdverb
        countVocBasPreposition = countVocPreposition
        countVocBasParticle = countVocParticle
        countVocBasJunction = countVocJunction
        countVocBasExpression = countVocExpression
        countVocBasCooccurrence = countVocCooccurrence
        countVocBasGroup = countVocGroup

        ' Pronomen
        numPronomen = espDOM.GetElementsByTagName("Pronomen")
        countVocPronomen = numPronomen.Count
        data01DOM = espDOM.GetElementsByTagName("ProGer")
        data02DOM = espDOM.GetElementsByTagName("ProEsp")
        data03DOM = espDOM.GetElementsByTagName("ProEng")
        data04DOM = espDOM.GetElementsByTagName("ProFra")
        data05DOM = espDOM.GetElementsByTagName("ProSpa")
        data06DOM = espDOM.GetElementsByTagName("ProIta")
        data07DOM = espDOM.GetElementsByTagName("ProPor")
        data08DOM = espDOM.GetElementsByTagName("ProDan")
        data09DOM = espDOM.GetElementsByTagName("ProSwe")
        data10DOM = espDOM.GetElementsByTagName("ProGre")
        data11DOM = espDOM.GetElementsByTagName("ProRus")
        data12DOM = espDOM.GetElementsByTagName("ProPol")
        data13DOM = espDOM.GetElementsByTagName("ProCro")
        data14DOM = espDOM.GetElementsByTagName("ProSyn")
        data15DOM = espDOM.GetElementsByTagName("ProKon")
        data16DOM = espDOM.GetElementsByTagName("ProAny")
        For i = 1 To countVocPronomen
            ' zu Pronomen-Liste hinzufuegen
            pubVocabularyPro.Add(tmpVocPronomen)
            s = countVocBasPronomen + i
            ' Daten uebernehmen
            pubVocabularyPro(s)._NivPronomen = numPronomen.Item(i - 1).Attributes(1).InnerText
            pubVocabularyPro(s)._ThmPronomen = numPronomen.Item(i - 1).Attributes(2).InnerText
            pubVocabularyPro(s)._GrpPronomen = numPronomen.Item(i - 1).Attributes(3).InnerText
            pubVocabularyPro(s)._GerPronomen = data01DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._EspPronomen = data02DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._EngPronomen = data03DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._FraPronomen = data04DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._SpaPronomen = data05DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._ItaPronomen = data06DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._PorPronomen = data07DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._DanPronomen = data08DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._SwePronomen = data09DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._GrePronomen = data10DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._RusPronomen = data11DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._PolPronomen = data12DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._CroPronomen = data13DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._SynPronomen = data14DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._KonPronomen = data15DOM.Item(i - 1).InnerText
            pubVocabularyPro(s)._AnyPronomen = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyPro(s)._GrpPronomen = "-" Or pubVocabularyPro(s)._GrpPronomen.Length = 4 Or
                (pubVocabularyPro(s)._GrpPronomen.Length > 4 And (pubVocabularyPro(s)._GrpPronomen.Length - 4) Mod 5 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Pronoun Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyPro(s)._EspPronomen <> "***" And pubVocabularyPro(s)._EspPronomen <> "###" And pubVocabularyPro(s)._EspPronomen <> "") Then pubSizePronomen(0) = pubSizePronomen(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 0) + 1
            If (pubVocabularyPro(s)._GerPronomen <> "***" And pubVocabularyPro(s)._GerPronomen <> "###" And pubVocabularyPro(s)._GerPronomen <> "") Then pubSizePronomen(1) = pubSizePronomen(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 1) + 1
            If (pubVocabularyPro(s)._EngPronomen <> "***" And pubVocabularyPro(s)._EngPronomen <> "###" And pubVocabularyPro(s)._EngPronomen <> "") Then pubSizePronomen(2) = pubSizePronomen(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 2) + 1
            If (pubVocabularyPro(s)._FraPronomen <> "***" And pubVocabularyPro(s)._FraPronomen <> "###" And pubVocabularyPro(s)._FraPronomen <> "") Then pubSizePronomen(3) = pubSizePronomen(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 3) + 1
            If (pubVocabularyPro(s)._SpaPronomen <> "***" And pubVocabularyPro(s)._SpaPronomen <> "###" And pubVocabularyPro(s)._SpaPronomen <> "") Then pubSizePronomen(4) = pubSizePronomen(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 4) + 1
            If (pubVocabularyPro(s)._ItaPronomen <> "***" And pubVocabularyPro(s)._ItaPronomen <> "###" And pubVocabularyPro(s)._ItaPronomen <> "") Then pubSizePronomen(5) = pubSizePronomen(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 5) + 1
            If (pubVocabularyPro(s)._PorPronomen <> "***" And pubVocabularyPro(s)._PorPronomen <> "###" And pubVocabularyPro(s)._PorPronomen <> "") Then pubSizePronomen(6) = pubSizePronomen(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 6) + 1
            If (pubVocabularyPro(s)._DanPronomen <> "***" And pubVocabularyPro(s)._DanPronomen <> "###" And pubVocabularyPro(s)._DanPronomen <> "") Then pubSizePronomen(7) = pubSizePronomen(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 7) + 1
            If (pubVocabularyPro(s)._SwePronomen <> "***" And pubVocabularyPro(s)._SwePronomen <> "###" And pubVocabularyPro(s)._SwePronomen <> "") Then pubSizePronomen(8) = pubSizePronomen(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 8) + 1
            If (pubVocabularyPro(s)._GrePronomen <> "***" And pubVocabularyPro(s)._GrePronomen <> "###" And pubVocabularyPro(s)._GrePronomen <> "") Then pubSizePronomen(9) = pubSizePronomen(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 9) + 1
            If (pubVocabularyPro(s)._RusPronomen <> "***" And pubVocabularyPro(s)._RusPronomen <> "###" And pubVocabularyPro(s)._RusPronomen <> "") Then pubSizePronomen(10) = pubSizePronomen(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 10) + 1
            If (pubVocabularyPro(s)._PolPronomen <> "***" And pubVocabularyPro(s)._PolPronomen <> "###" And pubVocabularyPro(s)._PolPronomen <> "") Then pubSizePronomen(11) = pubSizePronomen(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 11) + 1
            If (pubVocabularyPro(s)._CroPronomen <> "***" And pubVocabularyPro(s)._CroPronomen <> "###" And pubVocabularyPro(s)._CroPronomen <> "") Then pubSizePronomen(12) = pubSizePronomen(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 12) + 1
            If (pubVocabularyPro(s)._AnyPronomen <> "***" And pubVocabularyPro(s)._AnyPronomen <> "###" And pubVocabularyPro(s)._AnyPronomen <> "") Then pubSizePronomen(13) = pubSizePronomen(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Pronomen, s)), 13) + 1
            ' neu initialisieren
            tmpVocPronomen = Nothing
            tmpVocPronomen = New clsVocabularyPro
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Nomen
        numNomen = espDOM.GetElementsByTagName("Nomen")
        countVocNomen = numNomen.Count
        data01DOM = espDOM.GetElementsByTagName("NomGer")
        data02DOM = espDOM.GetElementsByTagName("NomEsp")
        data03DOM = espDOM.GetElementsByTagName("NomEng")
        data04DOM = espDOM.GetElementsByTagName("NomFra")
        data05DOM = espDOM.GetElementsByTagName("NomSpa")
        data06DOM = espDOM.GetElementsByTagName("NomIta")
        data07DOM = espDOM.GetElementsByTagName("NomPor")
        data08DOM = espDOM.GetElementsByTagName("NomDan")
        data09DOM = espDOM.GetElementsByTagName("NomSwe")
        data10DOM = espDOM.GetElementsByTagName("NomGre")
        data11DOM = espDOM.GetElementsByTagName("NomRus")
        data12DOM = espDOM.GetElementsByTagName("NomPol")
        data13DOM = espDOM.GetElementsByTagName("NomCro")
        data14DOM = espDOM.GetElementsByTagName("NomSyn")
        data15DOM = espDOM.GetElementsByTagName("NomKon")
        data16DOM = espDOM.GetElementsByTagName("NomAny")
        For i = 1 To countVocNomen
            ' zu Nomen-Liste hinzufuegen
            pubVocabularyNom.Add(tmpVocNomen)
            s = countVocBasNomen + i
            ' Daten uebernehmen
            pubVocabularyNom(s)._NivNomen = numNomen.Item(i - 1).Attributes(1).InnerText
            pubVocabularyNom(s)._ThmNomen = numNomen.Item(i - 1).Attributes(2).InnerText
            pubVocabularyNom(s)._GrpNomen = numNomen.Item(i - 1).Attributes(3).InnerText
            pubVocabularyNom(s)._GerNomen = data01DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._EspNomen = data02DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._EngNomen = data03DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._FraNomen = data04DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._SpaNomen = data05DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._ItaNomen = data06DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._PorNomen = data07DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._DanNomen = data08DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._SweNomen = data09DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._GreNomen = data10DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._RusNomen = data11DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._PolNomen = data12DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._CroNomen = data13DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._SynNomen = data14DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._KonNomen = data15DOM.Item(i - 1).InnerText
            pubVocabularyNom(s)._AnyNomen = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyNom(s)._GrpNomen = "-" Or pubVocabularyNom(s)._GrpNomen.Length = 4 Or
                (pubVocabularyNom(s)._GrpNomen.Length > 4 And (pubVocabularyNom(s)._GrpNomen.Length - 4) Mod 5 = 0) Or
                (pubVocabularyNom(s)._GrpNomen.StartsWith("E") = True And pubVocabularyNom(s)._GrpNomen.Length = 5) Or
                (pubVocabularyNom(s)._GrpNomen.Length > 5 And (pubVocabularyNom(s)._GrpNomen.Length - 5) Mod 6 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Noun Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyNom(s)._EspNomen <> "***" And pubVocabularyNom(s)._EspNomen <> "###" And pubVocabularyNom(s)._EspNomen <> "") Then pubSizeNomen(0) = pubSizeNomen(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 0) + 1
            If (pubVocabularyNom(s)._GerNomen <> "***" And pubVocabularyNom(s)._GerNomen <> "###" And pubVocabularyNom(s)._GerNomen <> "") Then pubSizeNomen(1) = pubSizeNomen(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 1) + 1
            If (pubVocabularyNom(s)._EngNomen <> "***" And pubVocabularyNom(s)._EngNomen <> "###" And pubVocabularyNom(s)._EngNomen <> "") Then pubSizeNomen(2) = pubSizeNomen(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 2) + 1
            If (pubVocabularyNom(s)._FraNomen <> "***" And pubVocabularyNom(s)._FraNomen <> "###" And pubVocabularyNom(s)._FraNomen <> "") Then pubSizeNomen(3) = pubSizeNomen(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 3) + 1
            If (pubVocabularyNom(s)._SpaNomen <> "***" And pubVocabularyNom(s)._SpaNomen <> "###" And pubVocabularyNom(s)._SpaNomen <> "") Then pubSizeNomen(4) = pubSizeNomen(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 4) + 1
            If (pubVocabularyNom(s)._ItaNomen <> "***" And pubVocabularyNom(s)._ItaNomen <> "###" And pubVocabularyNom(s)._ItaNomen <> "") Then pubSizeNomen(5) = pubSizeNomen(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 5) + 1
            If (pubVocabularyNom(s)._PorNomen <> "***" And pubVocabularyNom(s)._PorNomen <> "###" And pubVocabularyNom(s)._PorNomen <> "") Then pubSizeNomen(6) = pubSizeNomen(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 6) + 1
            If (pubVocabularyNom(s)._DanNomen <> "***" And pubVocabularyNom(s)._DanNomen <> "###" And pubVocabularyNom(s)._DanNomen <> "") Then pubSizeNomen(7) = pubSizeNomen(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 7) + 1
            If (pubVocabularyNom(s)._SweNomen <> "***" And pubVocabularyNom(s)._SweNomen <> "###" And pubVocabularyNom(s)._SweNomen <> "") Then pubSizeNomen(8) = pubSizeNomen(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 8) + 1
            If (pubVocabularyNom(s)._GreNomen <> "***" And pubVocabularyNom(s)._GreNomen <> "###" And pubVocabularyNom(s)._GreNomen <> "") Then pubSizeNomen(9) = pubSizeNomen(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 9) + 1
            If (pubVocabularyNom(s)._RusNomen <> "***" And pubVocabularyNom(s)._RusNomen <> "###" And pubVocabularyNom(s)._RusNomen <> "") Then pubSizeNomen(10) = pubSizeNomen(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 10) + 1
            If (pubVocabularyNom(s)._PolNomen <> "***" And pubVocabularyNom(s)._PolNomen <> "###" And pubVocabularyNom(s)._PolNomen <> "") Then pubSizeNomen(11) = pubSizeNomen(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 11) + 1
            If (pubVocabularyNom(s)._CroNomen <> "***" And pubVocabularyNom(s)._CroNomen <> "###" And pubVocabularyNom(s)._CroNomen <> "") Then pubSizeNomen(12) = pubSizeNomen(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 12) + 1
            If (pubVocabularyNom(s)._AnyNomen <> "***" And pubVocabularyNom(s)._AnyNomen <> "###" And pubVocabularyNom(s)._AnyNomen <> "") Then pubSizeNomen(13) = pubSizeNomen(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Nomen, s)), 13) + 1
            ' extra Vokabular
            If (pubVocabularyNom(s)._NivNomen.StartsWith("E") = True) Then
                pubVocExtAvail(0) = True
                If (pubVocabularyNom(s)._NivNomen) = "EA" Then pubVocExtAvail(VocExt.EA) = pubVocExtAvail(VocExt.EA) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EB" Then pubVocExtAvail(VocExt.EB) = pubVocExtAvail(VocExt.EB) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EC" Then pubVocExtAvail(VocExt.EC) = pubVocExtAvail(VocExt.EC) + 1
                If (pubVocabularyNom(s)._NivNomen) = "ED" Then pubVocExtAvail(VocExt.ED) = pubVocExtAvail(VocExt.ED) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EE" Then pubVocExtAvail(VocExt.EE) = pubVocExtAvail(VocExt.EE) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EG" Then pubVocExtAvail(VocExt.EG) = pubVocExtAvail(VocExt.EG) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EH" Then pubVocExtAvail(VocExt.EH) = pubVocExtAvail(VocExt.EH) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EI" Then pubVocExtAvail(VocExt.EI) = pubVocExtAvail(VocExt.EI) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EJ" Then pubVocExtAvail(VocExt.EJ) = pubVocExtAvail(VocExt.EJ) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EK" Then pubVocExtAvail(VocExt.EK) = pubVocExtAvail(VocExt.EK) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EL" Then pubVocExtAvail(VocExt.EL) = pubVocExtAvail(VocExt.EL) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EM" Then pubVocExtAvail(VocExt.EM) = pubVocExtAvail(VocExt.EM) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EP" Then pubVocExtAvail(VocExt.EP) = pubVocExtAvail(VocExt.EP) + 1
                If (pubVocabularyNom(s)._NivNomen) = "ER" Then pubVocExtAvail(VocExt.ER) = pubVocExtAvail(VocExt.ER) + 1
                If (pubVocabularyNom(s)._NivNomen) = "ES" Then pubVocExtAvail(VocExt.ES) = pubVocExtAvail(VocExt.ES) + 1
                If (pubVocabularyNom(s)._NivNomen) = "ET" Then pubVocExtAvail(VocExt.ET) = pubVocExtAvail(VocExt.ET) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EU" Then pubVocExtAvail(VocExt.EU) = pubVocExtAvail(VocExt.EU) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EW" Then pubVocExtAvail(VocExt.EW) = pubVocExtAvail(VocExt.EW) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EY" Then pubVocExtAvail(VocExt.EY) = pubVocExtAvail(VocExt.EY) + 1
                If (pubVocabularyNom(s)._NivNomen) = "EZ" Then pubVocExtAvail(VocExt.EZ) = pubVocExtAvail(VocExt.EZ) + 1
            End If
            ' neu initialisieren
            tmpVocNomen = Nothing
            tmpVocNomen = New clsVocabularyNom
            ' Check
            If (String.IsNullOrEmpty(pubVocabularyNom(s)._EspNomen) = False) Then
                If (pubVocabularyNom(s)._EspNomen.Substring(pubVocabularyNom(s)._EspNomen.Length - 1) <> "o" And _
                    pubVocabularyNom(s)._EspNomen.Substring(pubVocabularyNom(s)._EspNomen.Length - 1) <> "j") Then
                    MsgBox("Noun No. " & i & " does not have the Ending 'o'", MsgBoxStyle.Information, "readVocabulary")
                End If
            End If
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Verb
        numVerb = espDOM.GetElementsByTagName("Verb")
        countVocVerb = numVerb.Count
        data01DOM = espDOM.GetElementsByTagName("VerGer")
        data02DOM = espDOM.GetElementsByTagName("VerEsp")
        data03DOM = espDOM.GetElementsByTagName("VerEng")
        data04DOM = espDOM.GetElementsByTagName("VerFra")
        data05DOM = espDOM.GetElementsByTagName("VerSpa")
        data06DOM = espDOM.GetElementsByTagName("VerIta")
        data07DOM = espDOM.GetElementsByTagName("VerPor")
        data08DOM = espDOM.GetElementsByTagName("VerDan")
        data09DOM = espDOM.GetElementsByTagName("VerSwe")
        data10DOM = espDOM.GetElementsByTagName("VerGre")
        data11DOM = espDOM.GetElementsByTagName("VerRus")
        data12DOM = espDOM.GetElementsByTagName("VerPol")
        data13DOM = espDOM.GetElementsByTagName("VerCro")
        data14DOM = espDOM.GetElementsByTagName("VerSyn")
        data15DOM = espDOM.GetElementsByTagName("VerKon")
        data16DOM = espDOM.GetElementsByTagName("VerAny")
        For i = 1 To countVocVerb
            ' zu Verben-Liste hinzufuegen
            pubVocabularyVer.Add(tmpVocVerb)
            s = countVocBasVerb + i
            ' Daten uebernehmen
            pubVocabularyVer(s)._NivVerb = numVerb.Item(i - 1).Attributes(1).InnerText
            pubVocabularyVer(s)._ThmVerb = numVerb.Item(i - 1).Attributes(2).InnerText
            pubVocabularyVer(s)._GrpVerb = numVerb.Item(i - 1).Attributes(3).InnerText
            pubVocabularyVer(s)._GerVerb = data01DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._EspVerb = data02DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._EngVerb = data03DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._FraVerb = data04DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._SpaVerb = data05DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._ItaVerb = data06DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._PorVerb = data07DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._DanVerb = data08DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._SweVerb = data09DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._GreVerb = data10DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._RusVerb = data11DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._PolVerb = data12DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._CroVerb = data13DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._SynVerb = data14DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._KonVerb = data15DOM.Item(i - 1).InnerText
            pubVocabularyVer(s)._AnyVerb = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyVer(s)._GrpVerb = "-" Or pubVocabularyVer(s)._GrpVerb.Length = 4 Or
                (pubVocabularyVer(s)._GrpVerb.Length > 4 And (pubVocabularyVer(s)._GrpVerb.Length - 4) Mod 5 = 0) Or
                (pubVocabularyVer(s)._GrpVerb.StartsWith("E") = True) And pubVocabularyVer(s)._GrpVerb.Length = 5 Or
                (pubVocabularyVer(s)._GrpVerb.Length > 5 And (pubVocabularyVer(s)._GrpVerb.Length - 5) Mod 6 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Verb Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyVer(s)._EspVerb <> "***" And pubVocabularyVer(s)._EspVerb <> "###" And pubVocabularyVer(s)._EspVerb <> "") Then pubSizeVerb(0) = pubSizeVerb(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 0) + 1
            If (pubVocabularyVer(s)._GerVerb <> "***" And pubVocabularyVer(s)._GerVerb <> "###" And pubVocabularyVer(s)._GerVerb <> "") Then pubSizeVerb(1) = pubSizeVerb(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 1) + 1
            If (pubVocabularyVer(s)._EngVerb <> "***" And pubVocabularyVer(s)._EngVerb <> "###" And pubVocabularyVer(s)._EngVerb <> "") Then pubSizeVerb(2) = pubSizeVerb(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 2) + 1
            If (pubVocabularyVer(s)._FraVerb <> "***" And pubVocabularyVer(s)._FraVerb <> "###" And pubVocabularyVer(s)._FraVerb <> "") Then pubSizeVerb(3) = pubSizeVerb(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 3) + 1
            If (pubVocabularyVer(s)._SpaVerb <> "***" And pubVocabularyVer(s)._SpaVerb <> "###" And pubVocabularyVer(s)._SpaVerb <> "") Then pubSizeVerb(4) = pubSizeVerb(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 4) + 1
            If (pubVocabularyVer(s)._ItaVerb <> "***" And pubVocabularyVer(s)._ItaVerb <> "###" And pubVocabularyVer(s)._ItaVerb <> "") Then pubSizeVerb(5) = pubSizeVerb(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 5) + 1
            If (pubVocabularyVer(s)._PorVerb <> "***" And pubVocabularyVer(s)._PorVerb <> "###" And pubVocabularyVer(s)._PorVerb <> "") Then pubSizeVerb(6) = pubSizeVerb(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 6) + 1
            If (pubVocabularyVer(s)._DanVerb <> "***" And pubVocabularyVer(s)._DanVerb <> "###" And pubVocabularyVer(s)._DanVerb <> "") Then pubSizeVerb(7) = pubSizeVerb(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 7) + 1
            If (pubVocabularyVer(s)._SweVerb <> "***" And pubVocabularyVer(s)._SweVerb <> "###" And pubVocabularyVer(s)._SweVerb <> "") Then pubSizeVerb(8) = pubSizeVerb(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 8) + 1
            If (pubVocabularyVer(s)._GreVerb <> "***" And pubVocabularyVer(s)._GreVerb <> "###" And pubVocabularyVer(s)._GreVerb <> "") Then pubSizeVerb(9) = pubSizeVerb(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 9) + 1
            If (pubVocabularyVer(s)._RusVerb <> "***" And pubVocabularyVer(s)._RusVerb <> "###" And pubVocabularyVer(s)._RusVerb <> "") Then pubSizeVerb(10) = pubSizeVerb(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 10) + 1
            If (pubVocabularyVer(s)._PolVerb <> "***" And pubVocabularyVer(s)._PolVerb <> "###" And pubVocabularyVer(s)._PolVerb <> "") Then pubSizeVerb(11) = pubSizeVerb(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 11) + 1
            If (pubVocabularyVer(s)._CroVerb <> "***" And pubVocabularyVer(s)._CroVerb <> "###" And pubVocabularyVer(s)._CroVerb <> "") Then pubSizeVerb(12) = pubSizeVerb(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 12) + 1
            If (pubVocabularyVer(s)._AnyVerb <> "***" And pubVocabularyVer(s)._AnyVerb <> "###" And pubVocabularyVer(s)._AnyVerb <> "") Then pubSizeVerb(13) = pubSizeVerb(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Verb, s)), 13) + 1
            ' extra Vokabular
            If (pubVocabularyVer(s)._NivVerb.StartsWith("E") = True) Then
                pubVocExtAvail(0) = True
                If (pubVocabularyVer(s)._NivVerb) = "EA" Then pubVocExtAvail(VocExt.EA) = pubVocExtAvail(VocExt.EA) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EB" Then pubVocExtAvail(VocExt.EB) = pubVocExtAvail(VocExt.EB) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EC" Then pubVocExtAvail(VocExt.EC) = pubVocExtAvail(VocExt.EC) + 1
                If (pubVocabularyVer(s)._NivVerb) = "ED" Then pubVocExtAvail(VocExt.ED) = pubVocExtAvail(VocExt.ED) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EE" Then pubVocExtAvail(VocExt.EE) = pubVocExtAvail(VocExt.EE) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EG" Then pubVocExtAvail(VocExt.EG) = pubVocExtAvail(VocExt.EG) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EH" Then pubVocExtAvail(VocExt.EH) = pubVocExtAvail(VocExt.EH) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EI" Then pubVocExtAvail(VocExt.EI) = pubVocExtAvail(VocExt.EI) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EJ" Then pubVocExtAvail(VocExt.EJ) = pubVocExtAvail(VocExt.EJ) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EK" Then pubVocExtAvail(VocExt.EK) = pubVocExtAvail(VocExt.EK) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EL" Then pubVocExtAvail(VocExt.EL) = pubVocExtAvail(VocExt.EL) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EM" Then pubVocExtAvail(VocExt.EM) = pubVocExtAvail(VocExt.EM) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EP" Then pubVocExtAvail(VocExt.EP) = pubVocExtAvail(VocExt.EP) + 1
                If (pubVocabularyVer(s)._NivVerb) = "ER" Then pubVocExtAvail(VocExt.ER) = pubVocExtAvail(VocExt.ER) + 1
                If (pubVocabularyVer(s)._NivVerb) = "ES" Then pubVocExtAvail(VocExt.ES) = pubVocExtAvail(VocExt.ES) + 1
                If (pubVocabularyVer(s)._NivVerb) = "ET" Then pubVocExtAvail(VocExt.ET) = pubVocExtAvail(VocExt.ET) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EU" Then pubVocExtAvail(VocExt.EU) = pubVocExtAvail(VocExt.EU) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EW" Then pubVocExtAvail(VocExt.EW) = pubVocExtAvail(VocExt.EW) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EY" Then pubVocExtAvail(VocExt.EY) = pubVocExtAvail(VocExt.EY) + 1
                If (pubVocabularyVer(s)._NivVerb) = "EZ" Then pubVocExtAvail(VocExt.EZ) = pubVocExtAvail(VocExt.EZ) + 1
            End If
            ' neu initialisieren
            tmpVocVerb = Nothing
            tmpVocVerb = New clsVocabularyVer
            ' Check
            If (String.IsNullOrEmpty(pubVocabularyVer(s)._EspVerb) = False) Then
                If (pubVocabularyVer(s)._EspVerb.Substring(pubVocabularyVer(s)._EspVerb.Length - 1) <> "i") Then
                    MsgBox("Verb No. " & i & " does not have the Ending 'i'", MsgBoxStyle.Information, "readVocabulary")
                End If
            End If
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Adverb
        numAdverb = espDOM.GetElementsByTagName("Adverb")
        countVocAdverb = numAdverb.Count
        data01DOM = espDOM.GetElementsByTagName("AdvGer")
        data02DOM = espDOM.GetElementsByTagName("AdvEsp")
        data03DOM = espDOM.GetElementsByTagName("AdvEng")
        data04DOM = espDOM.GetElementsByTagName("AdvFra")
        data05DOM = espDOM.GetElementsByTagName("AdvSpa")
        data06DOM = espDOM.GetElementsByTagName("AdvIta")
        data07DOM = espDOM.GetElementsByTagName("AdvPor")
        data08DOM = espDOM.GetElementsByTagName("AdvDan")
        data09DOM = espDOM.GetElementsByTagName("AdvSwe")
        data10DOM = espDOM.GetElementsByTagName("AdvGre")
        data11DOM = espDOM.GetElementsByTagName("AdvRus")
        data12DOM = espDOM.GetElementsByTagName("AdvPol")
        data13DOM = espDOM.GetElementsByTagName("AdvCro")
        data14DOM = espDOM.GetElementsByTagName("AdvSyn")
        data15DOM = espDOM.GetElementsByTagName("AdvKon")
        data16DOM = espDOM.GetElementsByTagName("AdvAny")
        For i = 1 To countVocAdverb
            ' zu Adverben-Liste hinzufuegen
            pubVocabularyAdv.Add(tmpVocAdverb)
            s = countVocBasAdverb + i
            ' Daten uebernehmen
            pubVocabularyAdv(s)._NivAdverb = numAdverb.Item(i - 1).Attributes(1).InnerText
            pubVocabularyAdv(s)._ThmAdverb = numAdverb.Item(i - 1).Attributes(2).InnerText
            pubVocabularyAdv(s)._GrpAdverb = numAdverb.Item(i - 1).Attributes(3).InnerText
            pubVocabularyAdv(s)._GerAdverb = data01DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._EspAdverb = data02DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._EngAdverb = data03DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._FraAdverb = data04DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._SpaAdverb = data05DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._ItaAdverb = data06DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._PorAdverb = data07DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._DanAdverb = data08DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._SweAdverb = data09DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._GreAdverb = data10DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._RusAdverb = data11DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._PolAdverb = data12DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._CroAdverb = data13DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._SynAdverb = data14DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._KonAdverb = data15DOM.Item(i - 1).InnerText
            pubVocabularyAdv(s)._AnyAdverb = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyAdv(s)._GrpAdverb = "-" Or pubVocabularyAdv(s)._GrpAdverb.Length = 4 Or
                (pubVocabularyAdv(s)._GrpAdverb.Length > 4 And (pubVocabularyAdv(s)._GrpAdverb.Length - 4) Mod 5 = 0) Or
                (pubVocabularyAdv(s)._GrpAdverb.StartsWith("E") = True And pubVocabularyAdv(s)._GrpAdverb.Length = 5) Or
                (pubVocabularyAdv(s)._GrpAdverb.Length > 5 And (pubVocabularyAdv(s)._GrpAdverb.Length - 5) Mod 6 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Adverb Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyAdv(s)._EspAdverb <> "***" And pubVocabularyAdv(s)._EspAdverb <> "###" And pubVocabularyAdv(s)._EspAdverb <> "") Then pubSizeAdverb(0) = pubSizeAdverb(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 0) + 1
            If (pubVocabularyAdv(s)._GerAdverb <> "***" And pubVocabularyAdv(s)._GerAdverb <> "###" And pubVocabularyAdv(s)._GerAdverb <> "") Then pubSizeAdverb(1) = pubSizeAdverb(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 1) + 1
            If (pubVocabularyAdv(s)._EngAdverb <> "***" And pubVocabularyAdv(s)._EngAdverb <> "###" And pubVocabularyAdv(s)._EngAdverb <> "") Then pubSizeAdverb(2) = pubSizeAdverb(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 2) + 1
            If (pubVocabularyAdv(s)._FraAdverb <> "***" And pubVocabularyAdv(s)._FraAdverb <> "###" And pubVocabularyAdv(s)._FraAdverb <> "") Then pubSizeAdverb(3) = pubSizeAdverb(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 3) + 1
            If (pubVocabularyAdv(s)._SpaAdverb <> "***" And pubVocabularyAdv(s)._SpaAdverb <> "###" And pubVocabularyAdv(s)._SpaAdverb <> "") Then pubSizeAdverb(4) = pubSizeAdverb(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 4) + 1
            If (pubVocabularyAdv(s)._ItaAdverb <> "***" And pubVocabularyAdv(s)._ItaAdverb <> "###" And pubVocabularyAdv(s)._ItaAdverb <> "") Then pubSizeAdverb(5) = pubSizeAdverb(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 5) + 1
            If (pubVocabularyAdv(s)._PorAdverb <> "***" And pubVocabularyAdv(s)._PorAdverb <> "###" And pubVocabularyAdv(s)._PorAdverb <> "") Then pubSizeAdverb(6) = pubSizeAdverb(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 6) + 1
            If (pubVocabularyAdv(s)._DanAdverb <> "***" And pubVocabularyAdv(s)._DanAdverb <> "###" And pubVocabularyAdv(s)._DanAdverb <> "") Then pubSizeAdverb(7) = pubSizeAdverb(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 7) + 1
            If (pubVocabularyAdv(s)._SweAdverb <> "***" And pubVocabularyAdv(s)._SweAdverb <> "###" And pubVocabularyAdv(s)._SweAdverb <> "") Then pubSizeAdverb(8) = pubSizeAdverb(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 8) + 1
            If (pubVocabularyAdv(s)._GreAdverb <> "***" And pubVocabularyAdv(s)._GreAdverb <> "###" And pubVocabularyAdv(s)._GreAdverb <> "") Then pubSizeAdverb(9) = pubSizeAdverb(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 9) + 1
            If (pubVocabularyAdv(s)._RusAdverb <> "***" And pubVocabularyAdv(s)._RusAdverb <> "###" And pubVocabularyAdv(s)._RusAdverb <> "") Then pubSizeAdverb(10) = pubSizeAdverb(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 10) + 1
            If (pubVocabularyAdv(s)._PolAdverb <> "***" And pubVocabularyAdv(s)._PolAdverb <> "###" And pubVocabularyAdv(s)._PolAdverb <> "") Then pubSizeAdverb(11) = pubSizeAdverb(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 11) + 1
            If (pubVocabularyAdv(s)._CroAdverb <> "***" And pubVocabularyAdv(s)._CroAdverb <> "###" And pubVocabularyAdv(s)._CroAdverb <> "") Then pubSizeAdverb(12) = pubSizeAdverb(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 12) + 1
            If (pubVocabularyAdv(s)._AnyAdverb <> "***" And pubVocabularyAdv(s)._AnyAdverb <> "###" And pubVocabularyAdv(s)._AnyAdverb <> "") Then pubSizeAdverb(13) = pubSizeAdverb(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adverb, s)), 13) + 1
            ' extra Vokabular
            If (pubVocabularyAdv(s)._NivAdverb.StartsWith("E") = True) Then
                pubVocExtAvail(0) = True
                If (pubVocabularyAdv(s)._NivAdverb) = "EA" Then pubVocExtAvail(VocExt.EA) = pubVocExtAvail(VocExt.EA) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EB" Then pubVocExtAvail(VocExt.EB) = pubVocExtAvail(VocExt.EB) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EC" Then pubVocExtAvail(VocExt.EC) = pubVocExtAvail(VocExt.EC) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "ED" Then pubVocExtAvail(VocExt.ED) = pubVocExtAvail(VocExt.ED) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EE" Then pubVocExtAvail(VocExt.EE) = pubVocExtAvail(VocExt.EE) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EG" Then pubVocExtAvail(VocExt.EG) = pubVocExtAvail(VocExt.EG) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EH" Then pubVocExtAvail(VocExt.EH) = pubVocExtAvail(VocExt.EH) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EI" Then pubVocExtAvail(VocExt.EI) = pubVocExtAvail(VocExt.EI) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EJ" Then pubVocExtAvail(VocExt.EJ) = pubVocExtAvail(VocExt.EJ) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EK" Then pubVocExtAvail(VocExt.EK) = pubVocExtAvail(VocExt.EK) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EL" Then pubVocExtAvail(VocExt.EL) = pubVocExtAvail(VocExt.EL) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EM" Then pubVocExtAvail(VocExt.EM) = pubVocExtAvail(VocExt.EM) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EP" Then pubVocExtAvail(VocExt.EP) = pubVocExtAvail(VocExt.EP) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "ER" Then pubVocExtAvail(VocExt.ER) = pubVocExtAvail(VocExt.ER) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "ES" Then pubVocExtAvail(VocExt.ES) = pubVocExtAvail(VocExt.ES) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "ET" Then pubVocExtAvail(VocExt.ET) = pubVocExtAvail(VocExt.ET) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EU" Then pubVocExtAvail(VocExt.EU) = pubVocExtAvail(VocExt.EU) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EW" Then pubVocExtAvail(VocExt.EW) = pubVocExtAvail(VocExt.EW) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EY" Then pubVocExtAvail(VocExt.EY) = pubVocExtAvail(VocExt.EY) + 1
                If (pubVocabularyAdv(s)._NivAdverb) = "EZ" Then pubVocExtAvail(VocExt.EZ) = pubVocExtAvail(VocExt.EZ) + 1
            End If
            ' neu initialisieren
            tmpVocAdverb = Nothing
            tmpVocAdverb = New clsVocabularyAdv
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Adjektiv
        numAdjective = espDOM.GetElementsByTagName("Adjektiv")
        countVocAdjective = numAdjective.Count
        data01DOM = espDOM.GetElementsByTagName("AdjGer")
        data02DOM = espDOM.GetElementsByTagName("AdjEsp")
        data03DOM = espDOM.GetElementsByTagName("AdjEng")
        data04DOM = espDOM.GetElementsByTagName("AdjFra")
        data05DOM = espDOM.GetElementsByTagName("AdjSpa")
        data06DOM = espDOM.GetElementsByTagName("AdjIta")
        data07DOM = espDOM.GetElementsByTagName("AdjPor")
        data08DOM = espDOM.GetElementsByTagName("AdjDan")
        data09DOM = espDOM.GetElementsByTagName("AdjSwe")
        data10DOM = espDOM.GetElementsByTagName("AdjGre")
        data11DOM = espDOM.GetElementsByTagName("AdjRus")
        data12DOM = espDOM.GetElementsByTagName("AdjPol")
        data13DOM = espDOM.GetElementsByTagName("AdjCro")
        data14DOM = espDOM.GetElementsByTagName("AdjSyn")
        data15DOM = espDOM.GetElementsByTagName("AdjKon")
        data16DOM = espDOM.GetElementsByTagName("AdjAny")
        For i = 1 To countVocAdjective
            ' zu Adjektiv-Liste hinzufuegen
            pubVocabularyAdj.Add(tmpVocAdjective)
            s = countVocBasAdjective + i
            ' Daten uebernehmen
            pubVocabularyAdj(s)._NivAdjective = numAdjective.Item(i - 1).Attributes(1).InnerText
            pubVocabularyAdj(s)._ThmAdjective = numAdjective.Item(i - 1).Attributes(2).InnerText
            pubVocabularyAdj(s)._GrpAdjective = numAdjective.Item(i - 1).Attributes(3).InnerText
            pubVocabularyAdj(s)._GerAdjective = data01DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._EspAdjective = data02DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._EngAdjective = data03DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._FraAdjective = data04DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._SpaAdjective = data05DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._ItaAdjective = data06DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._PorAdjective = data07DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._DanAdjective = data08DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._SweAdjective = data09DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._GreAdjective = data10DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._RusAdjective = data11DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._PolAdjective = data12DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._CroAdjective = data13DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._SynAdjective = data14DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._KonAdjective = data15DOM.Item(i - 1).InnerText
            pubVocabularyAdj(s)._AnyAdjective = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyAdj(s)._GrpAdjective = "-" Or pubVocabularyAdj(s)._GrpAdjective.Length = 4 Or
                (pubVocabularyAdj(s)._GrpAdjective.Length > 4 And (pubVocabularyAdj(s)._GrpAdjective.Length - 4) Mod 5 = 0) Or
                (pubVocabularyAdj(s)._GrpAdjective.StartsWith("E") = True And pubVocabularyAdj(s)._GrpAdjective.Length = 5) Or
                (pubVocabularyAdj(s)._GrpAdjective.Length > 5 And (pubVocabularyAdj(s)._GrpAdjective.Length - 5) Mod 6 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Adjective Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyAdj(s)._EspAdjective <> "***" And pubVocabularyAdj(s)._EspAdjective <> "###" And pubVocabularyAdj(s)._EspAdjective <> "") Then pubSizeAdjective(0) = pubSizeAdjective(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 0) + 1
            If (pubVocabularyAdj(s)._GerAdjective <> "***" And pubVocabularyAdj(s)._GerAdjective <> "###" And pubVocabularyAdj(s)._GerAdjective <> "") Then pubSizeAdjective(1) = pubSizeAdjective(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 1) + 1
            If (pubVocabularyAdj(s)._EngAdjective <> "***" And pubVocabularyAdj(s)._EngAdjective <> "###" And pubVocabularyAdj(s)._EngAdjective <> "") Then pubSizeAdjective(2) = pubSizeAdjective(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 2) + 1
            If (pubVocabularyAdj(s)._FraAdjective <> "***" And pubVocabularyAdj(s)._FraAdjective <> "###" And pubVocabularyAdj(s)._FraAdjective <> "") Then pubSizeAdjective(3) = pubSizeAdjective(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 3) + 1
            If (pubVocabularyAdj(s)._SpaAdjective <> "***" And pubVocabularyAdj(s)._SpaAdjective <> "###" And pubVocabularyAdj(s)._SpaAdjective <> "") Then pubSizeAdjective(4) = pubSizeAdjective(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 4) + 1
            If (pubVocabularyAdj(s)._ItaAdjective <> "***" And pubVocabularyAdj(s)._ItaAdjective <> "###" And pubVocabularyAdj(s)._ItaAdjective <> "") Then pubSizeAdjective(5) = pubSizeAdjective(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 5) + 1
            If (pubVocabularyAdj(s)._PorAdjective <> "***" And pubVocabularyAdj(s)._PorAdjective <> "###" And pubVocabularyAdj(s)._PorAdjective <> "") Then pubSizeAdjective(6) = pubSizeAdjective(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 6) + 1
            If (pubVocabularyAdj(s)._DanAdjective <> "***" And pubVocabularyAdj(s)._DanAdjective <> "###" And pubVocabularyAdj(s)._DanAdjective <> "") Then pubSizeAdjective(7) = pubSizeAdjective(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 7) + 1
            If (pubVocabularyAdj(s)._SweAdjective <> "***" And pubVocabularyAdj(s)._SweAdjective <> "###" And pubVocabularyAdj(s)._SweAdjective <> "") Then pubSizeAdjective(8) = pubSizeAdjective(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 8) + 1
            If (pubVocabularyAdj(s)._GreAdjective <> "***" And pubVocabularyAdj(s)._GreAdjective <> "###" And pubVocabularyAdj(s)._GreAdjective <> "") Then pubSizeAdjective(9) = pubSizeAdjective(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 9) + 1
            If (pubVocabularyAdj(s)._RusAdjective <> "***" And pubVocabularyAdj(s)._RusAdjective <> "###" And pubVocabularyAdj(s)._RusAdjective <> "") Then pubSizeAdjective(10) = pubSizeAdjective(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 10) + 1
            If (pubVocabularyAdj(s)._PolAdjective <> "***" And pubVocabularyAdj(s)._PolAdjective <> "###" And pubVocabularyAdj(s)._PolAdjective <> "") Then pubSizeAdjective(11) = pubSizeAdjective(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 11) + 1
            If (pubVocabularyAdj(s)._CroAdjective <> "***" And pubVocabularyAdj(s)._CroAdjective <> "###" And pubVocabularyAdj(s)._CroAdjective <> "") Then pubSizeAdjective(12) = pubSizeAdjective(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 12) + 1
            If (pubVocabularyAdj(s)._AnyAdjective <> "***" And pubVocabularyAdj(s)._AnyAdjective <> "###" And pubVocabularyAdj(s)._AnyAdjective <> "") Then pubSizeAdjective(13) = pubSizeAdjective(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Adjective, s)), 13) + 1
            ' extra Vokabular
            If (pubVocabularyAdj(s)._NivAdjective.StartsWith("E") = True) Then
                pubVocExtAvail(0) = True
                If (pubVocabularyAdj(s)._NivAdjective) = "EA" Then pubVocExtAvail(VocExt.EA) = pubVocExtAvail(VocExt.EA) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EB" Then pubVocExtAvail(VocExt.EB) = pubVocExtAvail(VocExt.EB) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EC" Then pubVocExtAvail(VocExt.EC) = pubVocExtAvail(VocExt.EC) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "ED" Then pubVocExtAvail(VocExt.ED) = pubVocExtAvail(VocExt.ED) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EE" Then pubVocExtAvail(VocExt.EE) = pubVocExtAvail(VocExt.EE) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EG" Then pubVocExtAvail(VocExt.EG) = pubVocExtAvail(VocExt.EG) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EH" Then pubVocExtAvail(VocExt.EH) = pubVocExtAvail(VocExt.EH) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EI" Then pubVocExtAvail(VocExt.EI) = pubVocExtAvail(VocExt.EI) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EJ" Then pubVocExtAvail(VocExt.EJ) = pubVocExtAvail(VocExt.EJ) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EK" Then pubVocExtAvail(VocExt.EK) = pubVocExtAvail(VocExt.EK) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EL" Then pubVocExtAvail(VocExt.EL) = pubVocExtAvail(VocExt.EL) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EM" Then pubVocExtAvail(VocExt.EM) = pubVocExtAvail(VocExt.EM) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EP" Then pubVocExtAvail(VocExt.EP) = pubVocExtAvail(VocExt.EP) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "ER" Then pubVocExtAvail(VocExt.ER) = pubVocExtAvail(VocExt.ER) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "ES" Then pubVocExtAvail(VocExt.ES) = pubVocExtAvail(VocExt.ES) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "ET" Then pubVocExtAvail(VocExt.ET) = pubVocExtAvail(VocExt.ET) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EU" Then pubVocExtAvail(VocExt.EU) = pubVocExtAvail(VocExt.EU) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EW" Then pubVocExtAvail(VocExt.EW) = pubVocExtAvail(VocExt.EW) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EY" Then pubVocExtAvail(VocExt.EY) = pubVocExtAvail(VocExt.EY) + 1
                If (pubVocabularyAdj(s)._NivAdjective) = "EZ" Then pubVocExtAvail(VocExt.EZ) = pubVocExtAvail(VocExt.EZ) + 1
            End If
            ' neu initialisieren
            tmpVocAdjective = Nothing
            tmpVocAdjective = New clsVocabularyAdj
            ' Check
            If (String.IsNullOrEmpty(pubVocabularyAdj(s)._EspAdjective) = False) Then
                If (pubVocabularyAdj(s)._EspAdjective.Substring(pubVocabularyAdj(s)._EspAdjective.Length - 1) <> "a") Then
                    MsgBox("Adjective No. " & i & " does not have the Ending 'a'", MsgBoxStyle.Information, "readVocabulary")
                End If
            End If
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Praepositionen
        numPreposition = espDOM.GetElementsByTagName("Praeposition")
        countVocPreposition = numPreposition.Count
        data01DOM = espDOM.GetElementsByTagName("PreGer")
        data02DOM = espDOM.GetElementsByTagName("PreEsp")
        data03DOM = espDOM.GetElementsByTagName("PreEng")
        data04DOM = espDOM.GetElementsByTagName("PreFra")
        data05DOM = espDOM.GetElementsByTagName("PreSpa")
        data06DOM = espDOM.GetElementsByTagName("PreIta")
        data07DOM = espDOM.GetElementsByTagName("PrePor")
        data08DOM = espDOM.GetElementsByTagName("PreDan")
        data09DOM = espDOM.GetElementsByTagName("PreSwe")
        data10DOM = espDOM.GetElementsByTagName("PreGre")
        data11DOM = espDOM.GetElementsByTagName("PreRus")
        data12DOM = espDOM.GetElementsByTagName("PrePol")
        data13DOM = espDOM.GetElementsByTagName("PreCro")
        data14DOM = espDOM.GetElementsByTagName("PreSyn")
        data15DOM = espDOM.GetElementsByTagName("PreKon")
        data16DOM = espDOM.GetElementsByTagName("PreAny")
        For i = 1 To countVocPreposition
            ' zu Praepositions-Liste hinzufuegen
            pubVocabularyPre.Add(tmpVocPreposition)
            s = countVocBasPreposition + i
            ' Daten uebernehmen
            pubVocabularyPre(s)._NivPreposition = numPreposition.Item(i - 1).Attributes(1).InnerText
            pubVocabularyPre(s)._ThmPreposition = numPreposition.Item(i - 1).Attributes(2).InnerText
            pubVocabularyPre(s)._GrpPreposition = numPreposition.Item(i - 1).Attributes(3).InnerText
            pubVocabularyPre(s)._GerPreposition = data01DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._EspPreposition = data02DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._EngPreposition = data03DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._FraPreposition = data04DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._SpaPreposition = data05DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._ItaPreposition = data06DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._PorPreposition = data07DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._DanPreposition = data08DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._SwePreposition = data09DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._GrePreposition = data10DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._RusPreposition = data11DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._PolPreposition = data12DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._CroPreposition = data13DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._SynPreposition = data14DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._KonPreposition = data15DOM.Item(i - 1).InnerText
            pubVocabularyPre(s)._AnyPreposition = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyPre(s)._GrpPreposition = "-" Or pubVocabularyPre(s)._GrpPreposition.Length = 4 Or
                (pubVocabularyPre(s)._GrpPreposition.Length > 4 And (pubVocabularyPre(s)._GrpPreposition.Length - 4) Mod 5 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Preposition Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyPre(s)._EspPreposition <> "***" And pubVocabularyPre(s)._EspPreposition <> "###" And pubVocabularyPre(s)._EspPreposition <> "") Then pubSizePreposition(0) = pubSizePreposition(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 0) + 1
            If (pubVocabularyPre(s)._GerPreposition <> "***" And pubVocabularyPre(s)._GerPreposition <> "###" And pubVocabularyPre(s)._GerPreposition <> "") Then pubSizePreposition(1) = pubSizePreposition(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 1) + 1
            If (pubVocabularyPre(s)._EngPreposition <> "***" And pubVocabularyPre(s)._EngPreposition <> "###" And pubVocabularyPre(s)._EngPreposition <> "") Then pubSizePreposition(2) = pubSizePreposition(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 2) + 1
            If (pubVocabularyPre(s)._FraPreposition <> "***" And pubVocabularyPre(s)._FraPreposition <> "###" And pubVocabularyPre(s)._FraPreposition <> "") Then pubSizePreposition(3) = pubSizePreposition(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 3) + 1
            If (pubVocabularyPre(s)._SpaPreposition <> "***" And pubVocabularyPre(s)._SpaPreposition <> "###" And pubVocabularyPre(s)._SpaPreposition <> "") Then pubSizePreposition(4) = pubSizePreposition(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 4) + 1
            If (pubVocabularyPre(s)._ItaPreposition <> "***" And pubVocabularyPre(s)._ItaPreposition <> "###" And pubVocabularyPre(s)._ItaPreposition <> "") Then pubSizePreposition(5) = pubSizePreposition(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 5) + 1
            If (pubVocabularyPre(s)._PorPreposition <> "***" And pubVocabularyPre(s)._PorPreposition <> "###" And pubVocabularyPre(s)._PorPreposition <> "") Then pubSizePreposition(6) = pubSizePreposition(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 6) + 1
            If (pubVocabularyPre(s)._DanPreposition <> "***" And pubVocabularyPre(s)._DanPreposition <> "###" And pubVocabularyPre(s)._DanPreposition <> "") Then pubSizePreposition(7) = pubSizePreposition(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 7) + 1
            If (pubVocabularyPre(s)._SwePreposition <> "***" And pubVocabularyPre(s)._SwePreposition <> "###" And pubVocabularyPre(s)._SwePreposition <> "") Then pubSizePreposition(8) = pubSizePreposition(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 8) + 1
            If (pubVocabularyPre(s)._GrePreposition <> "***" And pubVocabularyPre(s)._GrePreposition <> "###" And pubVocabularyPre(s)._GrePreposition <> "") Then pubSizePreposition(9) = pubSizePreposition(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 9) + 1
            If (pubVocabularyPre(s)._RusPreposition <> "***" And pubVocabularyPre(s)._RusPreposition <> "###" And pubVocabularyPre(s)._RusPreposition <> "") Then pubSizePreposition(10) = pubSizePreposition(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 10) + 1
            If (pubVocabularyPre(s)._PolPreposition <> "***" And pubVocabularyPre(s)._PolPreposition <> "###" And pubVocabularyPre(s)._PolPreposition <> "") Then pubSizePreposition(11) = pubSizePreposition(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 11) + 1
            If (pubVocabularyPre(s)._CroPreposition <> "***" And pubVocabularyPre(s)._CroPreposition <> "###" And pubVocabularyPre(s)._CroPreposition <> "") Then pubSizePreposition(12) = pubSizePreposition(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 12) + 1
            If (pubVocabularyPre(s)._AnyPreposition <> "***" And pubVocabularyPre(s)._AnyPreposition <> "###" And pubVocabularyPre(s)._AnyPreposition <> "") Then pubSizePreposition(13) = pubSizePreposition(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Preposition, s)), 13) + 1
            ' neu initialisieren
            tmpVocPreposition = Nothing
            tmpVocPreposition = New clsVocabularyPre
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Partikel
        numParticle = espDOM.GetElementsByTagName("Partikel")
        countVocParticle = numParticle.Count
        data01DOM = espDOM.GetElementsByTagName("ParGer")
        data02DOM = espDOM.GetElementsByTagName("ParEsp")
        data03DOM = espDOM.GetElementsByTagName("ParEng")
        data04DOM = espDOM.GetElementsByTagName("ParFra")
        data05DOM = espDOM.GetElementsByTagName("ParSpa")
        data06DOM = espDOM.GetElementsByTagName("ParIta")
        data07DOM = espDOM.GetElementsByTagName("ParPor")
        data08DOM = espDOM.GetElementsByTagName("ParDan")
        data09DOM = espDOM.GetElementsByTagName("ParSwe")
        data10DOM = espDOM.GetElementsByTagName("ParGre")
        data11DOM = espDOM.GetElementsByTagName("ParRus")
        data12DOM = espDOM.GetElementsByTagName("ParPol")
        data13DOM = espDOM.GetElementsByTagName("ParCro")
        data14DOM = espDOM.GetElementsByTagName("ParSyn")
        data15DOM = espDOM.GetElementsByTagName("ParKon")
        data16DOM = espDOM.GetElementsByTagName("ParAny")
        For i = 1 To countVocParticle
            ' zu Partikel-Liste hinzufuegen
            pubVocabularyPar.Add(tmpVocParticle)
            s = countVocBasParticle + i
            ' Daten uebernehmen
            pubVocabularyPar(s)._NivParticle = numParticle.Item(i - 1).Attributes(1).InnerText
            pubVocabularyPar(s)._ThmParticle = numParticle.Item(i - 1).Attributes(2).InnerText
            pubVocabularyPar(s)._GrpParticle = numParticle.Item(i - 1).Attributes(3).InnerText
            pubVocabularyPar(s)._GerParticle = data01DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._EspParticle = data02DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._EngParticle = data03DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._FraParticle = data04DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._SpaParticle = data05DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._ItaParticle = data06DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._PorParticle = data07DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._DanParticle = data08DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._SweParticle = data09DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._GreParticle = data10DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._RusParticle = data11DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._PolParticle = data12DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._CroParticle = data13DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._SynParticle = data14DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._KonParticle = data15DOM.Item(i - 1).InnerText
            pubVocabularyPar(s)._AnyParticle = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyPar(s)._GrpParticle = "-" Or pubVocabularyPar(s)._GrpParticle.Length = 4 Or
                (pubVocabularyPar(s)._GrpParticle.Length > 4 And (pubVocabularyPar(s)._GrpParticle.Length - 4) Mod 5 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Particle Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyPar(s)._EspParticle <> "***" And pubVocabularyPar(s)._EspParticle <> "###" And pubVocabularyPar(s)._EspParticle <> "") Then pubSizeParticle(0) = pubSizeParticle(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 0) + 1
            If (pubVocabularyPar(s)._GerParticle <> "***" And pubVocabularyPar(s)._GerParticle <> "###" And pubVocabularyPar(s)._GerParticle <> "") Then pubSizeParticle(1) = pubSizeParticle(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 1) + 1
            If (pubVocabularyPar(s)._EngParticle <> "***" And pubVocabularyPar(s)._EngParticle <> "###" And pubVocabularyPar(s)._EngParticle <> "") Then pubSizeParticle(2) = pubSizeParticle(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 2) + 1
            If (pubVocabularyPar(s)._FraParticle <> "***" And pubVocabularyPar(s)._FraParticle <> "###" And pubVocabularyPar(s)._FraParticle <> "") Then pubSizeParticle(3) = pubSizeParticle(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 3) + 1
            If (pubVocabularyPar(s)._SpaParticle <> "***" And pubVocabularyPar(s)._SpaParticle <> "###" And pubVocabularyPar(s)._SpaParticle <> "") Then pubSizeParticle(4) = pubSizeParticle(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 4) + 1
            If (pubVocabularyPar(s)._ItaParticle <> "***" And pubVocabularyPar(s)._ItaParticle <> "###" And pubVocabularyPar(s)._ItaParticle <> "") Then pubSizeParticle(5) = pubSizeParticle(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 5) + 1
            If (pubVocabularyPar(s)._PorParticle <> "***" And pubVocabularyPar(s)._PorParticle <> "###" And pubVocabularyPar(s)._PorParticle <> "") Then pubSizeParticle(6) = pubSizeParticle(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 6) + 1
            If (pubVocabularyPar(s)._DanParticle <> "***" And pubVocabularyPar(s)._DanParticle <> "###" And pubVocabularyPar(s)._DanParticle <> "") Then pubSizeParticle(7) = pubSizeParticle(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 7) + 1
            If (pubVocabularyPar(s)._SweParticle <> "***" And pubVocabularyPar(s)._SweParticle <> "###" And pubVocabularyPar(s)._SweParticle <> "") Then pubSizeParticle(8) = pubSizeParticle(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 8) + 1
            If (pubVocabularyPar(s)._GreParticle <> "***" And pubVocabularyPar(s)._GreParticle <> "###" And pubVocabularyPar(s)._GreParticle <> "") Then pubSizeParticle(9) = pubSizeParticle(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 9) + 1
            If (pubVocabularyPar(s)._RusParticle <> "***" And pubVocabularyPar(s)._RusParticle <> "###" And pubVocabularyPar(s)._RusParticle <> "") Then pubSizeParticle(10) = pubSizeParticle(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 10) + 1
            If (pubVocabularyPar(s)._PolParticle <> "***" And pubVocabularyPar(s)._PolParticle <> "###" And pubVocabularyPar(s)._PolParticle <> "") Then pubSizeParticle(11) = pubSizeParticle(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 11) + 1
            If (pubVocabularyPar(s)._CroParticle <> "***" And pubVocabularyPar(s)._CroParticle <> "###" And pubVocabularyPar(s)._CroParticle <> "") Then pubSizeParticle(12) = pubSizeParticle(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 12) + 1
            If (pubVocabularyPar(s)._AnyParticle <> "***" And pubVocabularyPar(s)._AnyParticle <> "###" And pubVocabularyPar(s)._AnyParticle <> "") Then pubSizeParticle(13) = pubSizeParticle(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Particle, s)), 13) + 1
            ' neu initialisieren
            tmpVocParticle = Nothing
            tmpVocParticle = New clsVocabularyPar
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Junktionen
        numKonjunction = espDOM.GetElementsByTagName("Junktion")
        countVocJunction = numKonjunction.Count
        data01DOM = espDOM.GetElementsByTagName("JunGer")
        data02DOM = espDOM.GetElementsByTagName("JunEsp")
        data03DOM = espDOM.GetElementsByTagName("JunEng")
        data04DOM = espDOM.GetElementsByTagName("JunFra")
        data05DOM = espDOM.GetElementsByTagName("JunSpa")
        data06DOM = espDOM.GetElementsByTagName("JunIta")
        data07DOM = espDOM.GetElementsByTagName("JunPor")
        data08DOM = espDOM.GetElementsByTagName("JunDan")
        data09DOM = espDOM.GetElementsByTagName("JunSwe")
        data10DOM = espDOM.GetElementsByTagName("JunGre")
        data11DOM = espDOM.GetElementsByTagName("JunRus")
        data12DOM = espDOM.GetElementsByTagName("JunPol")
        data13DOM = espDOM.GetElementsByTagName("JunCro")
        data14DOM = espDOM.GetElementsByTagName("JunSyn")
        data15DOM = espDOM.GetElementsByTagName("JunKon")
        data16DOM = espDOM.GetElementsByTagName("JunAny")
        For i = 1 To countVocJunction
            ' zu Junktions-Liste hinzufuegen
            pubVocabularyJun.Add(tmpVocJunction)
            s = countVocBasJunction + i
            ' Daten uebernehmen
            pubVocabularyJun(s)._NivJunction = numKonjunction.Item(i - 1).Attributes(1).InnerText
            pubVocabularyJun(s)._ThmJunction = numKonjunction.Item(i - 1).Attributes(2).InnerText
            pubVocabularyJun(s)._GrpJunction = numKonjunction.Item(i - 1).Attributes(3).InnerText
            pubVocabularyJun(s)._GerJunction = data01DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._EspJunction = data02DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._EngJunction = data03DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._FraJunction = data04DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._SpaJunction = data05DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._ItaJunction = data06DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._PorJunction = data07DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._DanJunction = data08DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._SweJunction = data09DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._GreJunction = data10DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._RusJunction = data11DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._PolJunction = data12DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._CroJunction = data13DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._SynJunction = data14DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._KonJunction = data15DOM.Item(i - 1).InnerText
            pubVocabularyJun(s)._AnyJunction = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyJun(s)._GrpJunction = "-" Or pubVocabularyJun(s)._GrpJunction.Length = 4 Or
                (pubVocabularyJun(s)._GrpJunction.Length > 4 And (pubVocabularyJun(s)._GrpJunction.Length - 4) Mod 5 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Junction Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyJun(s)._EspJunction <> "***" And pubVocabularyJun(s)._EspJunction <> "###" And pubVocabularyJun(s)._EspJunction <> "") Then pubSizeJunction(0) = pubSizeJunction(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 0) + 1
            If (pubVocabularyJun(s)._GerJunction <> "***" And pubVocabularyJun(s)._GerJunction <> "###" And pubVocabularyJun(s)._GerJunction <> "") Then pubSizeJunction(1) = pubSizeJunction(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 1) + 1
            If (pubVocabularyJun(s)._EngJunction <> "***" And pubVocabularyJun(s)._EngJunction <> "###" And pubVocabularyJun(s)._EngJunction <> "") Then pubSizeJunction(2) = pubSizeJunction(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 2) + 1
            If (pubVocabularyJun(s)._FraJunction <> "***" And pubVocabularyJun(s)._FraJunction <> "###" And pubVocabularyJun(s)._FraJunction <> "") Then pubSizeJunction(3) = pubSizeJunction(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 3) + 1
            If (pubVocabularyJun(s)._SpaJunction <> "***" And pubVocabularyJun(s)._SpaJunction <> "###" And pubVocabularyJun(s)._SpaJunction <> "") Then pubSizeJunction(4) = pubSizeJunction(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 4) + 1
            If (pubVocabularyJun(s)._ItaJunction <> "***" And pubVocabularyJun(s)._ItaJunction <> "###" And pubVocabularyJun(s)._ItaJunction <> "") Then pubSizeJunction(5) = pubSizeJunction(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 5) + 1
            If (pubVocabularyJun(s)._PorJunction <> "***" And pubVocabularyJun(s)._PorJunction <> "###" And pubVocabularyJun(s)._PorJunction <> "") Then pubSizeJunction(6) = pubSizeJunction(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 6) + 1
            If (pubVocabularyJun(s)._DanJunction <> "***" And pubVocabularyJun(s)._DanJunction <> "###" And pubVocabularyJun(s)._DanJunction <> "") Then pubSizeJunction(7) = pubSizeJunction(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 7) + 1
            If (pubVocabularyJun(s)._SweJunction <> "***" And pubVocabularyJun(s)._SweJunction <> "###" And pubVocabularyJun(s)._SweJunction <> "") Then pubSizeJunction(8) = pubSizeJunction(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 8) + 1
            If (pubVocabularyJun(s)._GreJunction <> "***" And pubVocabularyJun(s)._GreJunction <> "###" And pubVocabularyJun(s)._GreJunction <> "") Then pubSizeJunction(9) = pubSizeJunction(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 9) + 1
            If (pubVocabularyJun(s)._RusJunction <> "***" And pubVocabularyJun(s)._RusJunction <> "###" And pubVocabularyJun(s)._RusJunction <> "") Then pubSizeJunction(10) = pubSizeJunction(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 10) + 1
            If (pubVocabularyJun(s)._PolJunction <> "***" And pubVocabularyJun(s)._PolJunction <> "###" And pubVocabularyJun(s)._PolJunction <> "") Then pubSizeJunction(11) = pubSizeJunction(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 11) + 1
            If (pubVocabularyJun(s)._CroJunction <> "***" And pubVocabularyJun(s)._CroJunction <> "###" And pubVocabularyJun(s)._CroJunction <> "") Then pubSizeJunction(12) = pubSizeJunction(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 12) + 1
            If (pubVocabularyJun(s)._AnyJunction <> "***" And pubVocabularyJun(s)._AnyJunction <> "###" And pubVocabularyJun(s)._AnyJunction <> "") Then pubSizeJunction(13) = pubSizeJunction(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Junction, s)), 13) + 1
            ' neu initialisieren
            tmpVocJunction = Nothing
            tmpVocJunction = New clsVocabularyJun
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Expressions
        numExpression = espDOM.GetElementsByTagName("Ausdruck")
        countVocExpression = numExpression.Count
        data01DOM = espDOM.GetElementsByTagName("ExpGer")
        data02DOM = espDOM.GetElementsByTagName("ExpEsp")
        data03DOM = espDOM.GetElementsByTagName("ExpEng")
        data04DOM = espDOM.GetElementsByTagName("ExpFra")
        data05DOM = espDOM.GetElementsByTagName("ExpSpa")
        data06DOM = espDOM.GetElementsByTagName("ExpIta")
        data07DOM = espDOM.GetElementsByTagName("ExpPor")
        data08DOM = espDOM.GetElementsByTagName("ExpDan")
        data09DOM = espDOM.GetElementsByTagName("ExpSwe")
        data10DOM = espDOM.GetElementsByTagName("ExpGre")
        data11DOM = espDOM.GetElementsByTagName("ExpRus")
        data12DOM = espDOM.GetElementsByTagName("ExpPol")
        data13DOM = espDOM.GetElementsByTagName("ExpCro")
        data14DOM = espDOM.GetElementsByTagName("ExpSyn")
        data15DOM = espDOM.GetElementsByTagName("ExpKon")
        data16DOM = espDOM.GetElementsByTagName("ExpAny")
        For i = 1 To countVocExpression
            ' zu Expressions-Liste hinzufuegen
            pubVocabularyExp.Add(tmpVocExpression)
            s = countVocBasExpression + i
            ' Daten uebernehmen
            pubVocabularyExp(s)._NivExpression = numExpression.Item(i - 1).Attributes(1).InnerText
            pubVocabularyExp(s)._ThmExpression = numExpression.Item(i - 1).Attributes(2).InnerText
            pubVocabularyExp(s)._GrpExpression = numExpression.Item(i - 1).Attributes(3).InnerText
            pubVocabularyExp(s)._GerExpression = data01DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._EspExpression = data02DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._EngExpression = data03DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._FraExpression = data04DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._SpaExpression = data05DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._ItaExpression = data06DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._PorExpression = data07DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._DanExpression = data08DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._SweExpression = data09DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._GreExpression = data10DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._RusExpression = data11DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._PolExpression = data12DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._CroExpression = data13DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._SynExpression = data14DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._KonExpression = data15DOM.Item(i - 1).InnerText
            pubVocabularyExp(s)._AnyExpression = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyExp(s)._GrpExpression = "-" Or pubVocabularyExp(s)._GrpExpression.Length = 4 Or
                (pubVocabularyExp(s)._GrpExpression.Length > 4 And (pubVocabularyExp(s)._GrpExpression.Length - 4) Mod 5 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Expression Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyExp(s)._EspExpression <> "***" And pubVocabularyExp(s)._EspExpression <> "###" And pubVocabularyExp(s)._EspExpression <> "") Then pubSizeExpression(0) = pubSizeExpression(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 0) + 1
            If (pubVocabularyExp(s)._GerExpression <> "***" And pubVocabularyExp(s)._GerExpression <> "###" And pubVocabularyExp(s)._GerExpression <> "") Then pubSizeExpression(1) = pubSizeExpression(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 1) + 1
            If (pubVocabularyExp(s)._EngExpression <> "***" And pubVocabularyExp(s)._EngExpression <> "###" And pubVocabularyExp(s)._EngExpression <> "") Then pubSizeExpression(2) = pubSizeExpression(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 2) + 1
            If (pubVocabularyExp(s)._FraExpression <> "***" And pubVocabularyExp(s)._FraExpression <> "###" And pubVocabularyExp(s)._FraExpression <> "") Then pubSizeExpression(3) = pubSizeExpression(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 3) + 1
            If (pubVocabularyExp(s)._SpaExpression <> "***" And pubVocabularyExp(s)._SpaExpression <> "###" And pubVocabularyExp(s)._SpaExpression <> "") Then pubSizeExpression(4) = pubSizeExpression(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 4) + 1
            If (pubVocabularyExp(s)._ItaExpression <> "***" And pubVocabularyExp(s)._ItaExpression <> "###" And pubVocabularyExp(s)._ItaExpression <> "") Then pubSizeExpression(5) = pubSizeExpression(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 5) + 1
            If (pubVocabularyExp(s)._PorExpression <> "***" And pubVocabularyExp(s)._PorExpression <> "###" And pubVocabularyExp(s)._PorExpression <> "") Then pubSizeExpression(6) = pubSizeExpression(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 6) + 1
            If (pubVocabularyExp(s)._DanExpression <> "***" And pubVocabularyExp(s)._DanExpression <> "###" And pubVocabularyExp(s)._DanExpression <> "") Then pubSizeExpression(7) = pubSizeExpression(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 7) + 1
            If (pubVocabularyExp(s)._SweExpression <> "***" And pubVocabularyExp(s)._SweExpression <> "###" And pubVocabularyExp(s)._SweExpression <> "") Then pubSizeExpression(8) = pubSizeExpression(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 8) + 1
            If (pubVocabularyExp(s)._GreExpression <> "***" And pubVocabularyExp(s)._GreExpression <> "###" And pubVocabularyExp(s)._GreExpression <> "") Then pubSizeExpression(9) = pubSizeExpression(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 9) + 1
            If (pubVocabularyExp(s)._RusExpression <> "***" And pubVocabularyExp(s)._RusExpression <> "###" And pubVocabularyExp(s)._RusExpression <> "") Then pubSizeExpression(10) = pubSizeExpression(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 10) + 1
            If (pubVocabularyExp(s)._PolExpression <> "***" And pubVocabularyExp(s)._PolExpression <> "###" And pubVocabularyExp(s)._PolExpression <> "") Then pubSizeExpression(11) = pubSizeExpression(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 11) + 1
            If (pubVocabularyExp(s)._CroExpression <> "***" And pubVocabularyExp(s)._CroExpression <> "###" And pubVocabularyExp(s)._CroExpression <> "") Then pubSizeExpression(12) = pubSizeExpression(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 12) + 1
            If (pubVocabularyExp(s)._AnyExpression <> "***" And pubVocabularyExp(s)._AnyExpression <> "###" And pubVocabularyExp(s)._AnyExpression <> "") Then pubSizeExpression(13) = pubSizeExpression(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.expression, s)), 13) + 1
            ' neu initialisieren
            tmpVocExpression = Nothing
            tmpVocExpression = New clsVocabularyExp
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Cooccurrences
        numCooccurrence = espDOM.GetElementsByTagName("Kookkurrenz")
        countVocCooccurrence = numCooccurrence.Count
        data01DOM = espDOM.GetElementsByTagName("CooGer")
        data02DOM = espDOM.GetElementsByTagName("CooEsp")
        data03DOM = espDOM.GetElementsByTagName("CooEng")
        data04DOM = espDOM.GetElementsByTagName("CooFra")
        data05DOM = espDOM.GetElementsByTagName("CooSpa")
        data06DOM = espDOM.GetElementsByTagName("CooIta")
        data07DOM = espDOM.GetElementsByTagName("CooPor")
        data08DOM = espDOM.GetElementsByTagName("CooDan")
        data09DOM = espDOM.GetElementsByTagName("CooSwe")
        data10DOM = espDOM.GetElementsByTagName("CooGre")
        data11DOM = espDOM.GetElementsByTagName("CooRus")
        data12DOM = espDOM.GetElementsByTagName("CooPol")
        data13DOM = espDOM.GetElementsByTagName("CooCro")
        data14DOM = espDOM.GetElementsByTagName("CooSyn")
        data15DOM = espDOM.GetElementsByTagName("CooKon")
        data16DOM = espDOM.GetElementsByTagName("CooAny")
        For i = 1 To countVocCooccurrence
            ' zu Kookkurrenz-Liste hinzufuegen
            pubVocabularyCoo.Add(tmpVocCooccurrence)
            s = countVocBasCooccurrence + i
            ' Daten uebernehmen
            pubVocabularyCoo(s)._NivCooccurrence = numCooccurrence.Item(i - 1).Attributes(1).InnerText
            pubVocabularyCoo(s)._ThmCooccurrence = numCooccurrence.Item(i - 1).Attributes(2).InnerText
            pubVocabularyCoo(s)._GrpCooccurrence = numCooccurrence.Item(i - 1).Attributes(3).InnerText
            pubVocabularyCoo(s)._GerCooccurrence = data01DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._EspCooccurrence = data02DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._EngCooccurrence = data03DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._FraCooccurrence = data04DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._SpaCooccurrence = data05DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._ItaCooccurrence = data06DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._PorCooccurrence = data07DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._DanCooccurrence = data08DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._SweCooccurrence = data09DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._GreCooccurrence = data10DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._RusCooccurrence = data11DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._PolCooccurrence = data12DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._CroCooccurrence = data13DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._SynCooccurrence = data14DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._KonCooccurrence = data15DOM.Item(i - 1).InnerText
            pubVocabularyCoo(s)._AnyCooccurrence = data16DOM.Item(i - 1).InnerText
            ' Checking
            If (pubVocabularyCoo(s)._GrpCooccurrence = "-" Or pubVocabularyCoo(s)._GrpCooccurrence.Length = 4 Or
                (pubVocabularyCoo(s)._GrpCooccurrence.Length > 4 And (pubVocabularyCoo(s)._GrpCooccurrence.Length - 4) Mod 5 = 0)) Then
                ' OK
            Else
                MsgBox("Warning: Length of Group Attribute not correct for Expression Number = " & i.ToString & " in " & fileType, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
            End If
            ' Fuellzustand
            If (pubVocabularyCoo(s)._EspCooccurrence <> "***" And pubVocabularyCoo(s)._EspCooccurrence <> "###" And pubVocabularyCoo(s)._EspCooccurrence <> "") Then pubSizeCooccurrence(0) = pubSizeCooccurrence(0) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 0) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 0) + 1
            If (pubVocabularyCoo(s)._GerCooccurrence <> "***" And pubVocabularyCoo(s)._GerCooccurrence <> "###" And pubVocabularyCoo(s)._GerCooccurrence <> "") Then pubSizeCooccurrence(1) = pubSizeCooccurrence(1) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 1) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 1) + 1
            If (pubVocabularyCoo(s)._EngCooccurrence <> "***" And pubVocabularyCoo(s)._EngCooccurrence <> "###" And pubVocabularyCoo(s)._EngCooccurrence <> "") Then pubSizeCooccurrence(2) = pubSizeCooccurrence(2) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 2) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 2) + 1
            If (pubVocabularyCoo(s)._FraCooccurrence <> "***" And pubVocabularyCoo(s)._FraCooccurrence <> "###" And pubVocabularyCoo(s)._FraCooccurrence <> "") Then pubSizeCooccurrence(3) = pubSizeCooccurrence(3) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 3) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 3) + 1
            If (pubVocabularyCoo(s)._SpaCooccurrence <> "***" And pubVocabularyCoo(s)._SpaCooccurrence <> "###" And pubVocabularyCoo(s)._SpaCooccurrence <> "") Then pubSizeCooccurrence(4) = pubSizeCooccurrence(4) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 4) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 4) + 1
            If (pubVocabularyCoo(s)._ItaCooccurrence <> "***" And pubVocabularyCoo(s)._ItaCooccurrence <> "###" And pubVocabularyCoo(s)._ItaCooccurrence <> "") Then pubSizeCooccurrence(5) = pubSizeCooccurrence(5) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 5) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 5) + 1
            If (pubVocabularyCoo(s)._PorCooccurrence <> "***" And pubVocabularyCoo(s)._PorCooccurrence <> "###" And pubVocabularyCoo(s)._PorCooccurrence <> "") Then pubSizeCooccurrence(6) = pubSizeCooccurrence(6) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 6) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 6) + 1
            If (pubVocabularyCoo(s)._DanCooccurrence <> "***" And pubVocabularyCoo(s)._DanCooccurrence <> "###" And pubVocabularyCoo(s)._DanCooccurrence <> "") Then pubSizeCooccurrence(7) = pubSizeCooccurrence(7) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 7) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 7) + 1
            If (pubVocabularyCoo(s)._SweCooccurrence <> "***" And pubVocabularyCoo(s)._SweCooccurrence <> "###" And pubVocabularyCoo(s)._SweCooccurrence <> "") Then pubSizeCooccurrence(8) = pubSizeCooccurrence(8) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 8) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 8) + 1
            If (pubVocabularyCoo(s)._GreCooccurrence <> "***" And pubVocabularyCoo(s)._GreCooccurrence <> "###" And pubVocabularyCoo(s)._GreCooccurrence <> "") Then pubSizeCooccurrence(9) = pubSizeCooccurrence(9) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 9) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 9) + 1
            If (pubVocabularyCoo(s)._RusCooccurrence <> "***" And pubVocabularyCoo(s)._RusCooccurrence <> "###" And pubVocabularyCoo(s)._RusCooccurrence <> "") Then pubSizeCooccurrence(10) = pubSizeCooccurrence(10) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 10) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 10) + 1
            If (pubVocabularyCoo(s)._PolCooccurrence <> "***" And pubVocabularyCoo(s)._PolCooccurrence <> "###" And pubVocabularyCoo(s)._PolCooccurrence <> "") Then pubSizeCooccurrence(11) = pubSizeCooccurrence(11) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 11) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 11) + 1
            If (pubVocabularyCoo(s)._CroCooccurrence <> "***" And pubVocabularyCoo(s)._CroCooccurrence <> "###" And pubVocabularyCoo(s)._CroCooccurrence <> "") Then pubSizeCooccurrence(12) = pubSizeCooccurrence(12) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 12) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 12) + 1
            If (pubVocabularyCoo(s)._AnyCooccurrence <> "***" And pubVocabularyCoo(s)._AnyCooccurrence <> "###" And pubVocabularyCoo(s)._AnyCooccurrence <> "") Then pubSizeCooccurrence(13) = pubSizeCooccurrence(13) + 1 : pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 13) = pubSizeNiveau(getNivInd(getNiveau(WordType.Cooccurrence, s)), 13) + 1
            ' neu initialisieren
            tmpVocCooccurrence = Nothing
            tmpVocCooccurrence = New clsVocabularyCoo
        Next

        data01DOM = Nothing
        data02DOM = Nothing
        data03DOM = Nothing
        data04DOM = Nothing
        data05DOM = Nothing
        data06DOM = Nothing
        data07DOM = Nothing
        data08DOM = Nothing
        data09DOM = Nothing
        data10DOM = Nothing
        data11DOM = Nothing
        data12DOM = Nothing
        data13DOM = Nothing
        data14DOM = Nothing
        data15DOM = Nothing
        data16DOM = Nothing

        ' Semant. Gruppen
        Dim countGrp As Integer
        Dim extwrd As String
        Dim extind As Integer
        Dim exthie As String
        Dim extstr As String
        Dim tmpField As String
        Dim countFields As Integer = 0
        numGroup = espDOM.GetElementsByTagName("Gruppe")
        countVocGroup = numGroup.Count
        For i = 1 To countVocGroup
            ' Gruppen: nur Felder!!!
            tmpField = numGroup.Item(i - 1).Attributes(0).InnerText
            If (tmpField.StartsWith("F") Or tmpField.StartsWith("G") Or tmpField.StartsWith("EF") Or tmpField.StartsWith("C") Or tmpField.StartsWith("D")) Then
                countFields = countFields + 1

                ' zu Groups-Liste hinzufuegen
                pubVocabularyGrp.Add(tmpVocGroup)
                s = countVocBasGroup + countFields

                ' Daten uebernehmen
                pubVocabularyGrp(s)._GrpNumber = numGroup.Item(i - 1).Attributes(0).InnerText
                pubVocabularyGrp(s)._GrpType = numGroup.Item(i - 1).Attributes(1).InnerText
                pubVocabularyGrp(s)._GrpName = numGroup.Item(i - 1).Attributes(2).InnerText
                pubVocabularyGrp(s)._GrpTheme = numGroup.Item(i - 1).Attributes(3).InnerText
                pubVocabularyGrp(s)._GrpLink = numGroup.Item(i - 1).Attributes(4).InnerText
                countGrp = 0
                For j = 1 To numGroup.Item(i - 1).ChildNodes.Count
                    If (j <= pubDimGroupMembers) Then
                        countGrp = countGrp + 1
                        pubVocabularyGrp(s)._GrpMember(j) = numGroup.Item(i - 1).ChildNodes(j - 1).InnerText.ToString
                        ' Check
                        If (pubVocabularyGrp(s)._GrpMember(j).Length = 8 Or pubVocabularyGrp(s)._GrpMember(j).Length = 12 Or
                            (pubVocabularyGrp(s)._GrpNumber.StartsWith("E") = True And (pubVocabularyGrp(s)._GrpMember(j).Length = 9 Or pubVocabularyGrp(s)._GrpMember(j).Length = 13))) Then
                            ' OK
                        Else
                            MsgBox("Warning: Length of Group Member ID <> 8/12 (standard) <> 9/13 (extra) for Group Number = " & pubVocabularyGrp(s)._GrpNumber & " / Group Member = " & j.ToString, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
                        End If
                        If (pubVocabularyGrp(s)._GrpNumber.StartsWith("EH") = True) Then
                            ' Hierarchie
                            If (pubVocabularyGrp(s)._GrpMember(j).Length = 13) Then
                                ' Extra-Vokabular: negative Nummerierung!
                                extwrd = pubVocabularyGrp(s)._GrpMember(j).Substring(0, 3)
                                extind = CInt(Val(pubVocabularyGrp(s)._GrpMember(j).Substring(4, 5)))
                                exthie = pubVocabularyGrp(s)._GrpMember(j).Substring(9, 4)
                                If (extwrd = "Pro") Then extind = countVocBasPronomen + extind
                                If (extwrd = "Nom") Then extind = countVocBasNomen + extind
                                If (extwrd = "Ver") Then extind = countVocBasVerb + extind
                                If (extwrd = "Adv") Then extind = countVocBasAdverb + extind
                                If (extwrd = "Adj") Then extind = countVocBasAdjective + extind
                                If (extwrd = "Pre") Then extind = countVocBasPreposition + extind
                                If (extwrd = "Par") Then extind = countVocBasParticle + extind
                                If (extwrd = "Jun") Then extind = countVocBasJunction + extind
                                extstr = extwrd + extind.ToString("00000") + exthie
                                pubVocabularyGrp(s)._GrpMember(j) = extstr
                            Else
                                MsgBox("Warning: Length of Group Member ID <> 9/13 (extra) for Group Number = " & pubVocabularyGrp(s)._GrpNumber & " / Group Member = " & j.ToString, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
                            End If
                        ElseIf (pubVocabularyGrp(s)._GrpNumber.StartsWith("E") = True) Then
                            ' alle anderen
                            If (pubVocabularyGrp(s)._GrpMember(j).Length = 9) Then
                                ' Extra-Vokabular: negative Nummerierung!
                                extwrd = pubVocabularyGrp(s)._GrpMember(j).Substring(0, 3)
                                extind = CInt(Val(pubVocabularyGrp(s)._GrpMember(j).Substring(4, 5)))
                                If (extwrd = "Pro") Then extind = countVocBasPronomen + extind
                                If (extwrd = "Nom") Then extind = countVocBasNomen + extind
                                If (extwrd = "Ver") Then extind = countVocBasVerb + extind
                                If (extwrd = "Adv") Then extind = countVocBasAdverb + extind
                                If (extwrd = "Adj") Then extind = countVocBasAdjective + extind
                                If (extwrd = "Pre") Then extind = countVocBasPreposition + extind
                                If (extwrd = "Par") Then extind = countVocBasParticle + extind
                                If (extwrd = "Jun") Then extind = countVocBasJunction + extind
                                extstr = extwrd + extind.ToString("00000")
                                pubVocabularyGrp(s)._GrpMember(j) = extstr
                            Else
                                MsgBox("Warning: Length of Group Member ID <> 9 (extra) for Group Number = " & pubVocabularyGrp(s)._GrpNumber & " / Group Member = " & j.ToString, MsgBoxStyle.Exclamation, "readVocabulary: Checking")
                            End If
                        End If
                    End If
                Next
                pubVocabularyGrp(s)._GrpMember(0) = countGrp
                ' neu initialisieren
                tmpVocGroup = Nothing
                tmpVocGroup = New clsVocabularyGrp
            End If
        Next

        ' aktueller Zaehlerstand
        countVocPronomen = countVocBasPronomen + countVocPronomen
        countVocNomen = countVocBasNomen + countVocNomen
        countVocVerb = countVocBasVerb + countVocVerb
        countVocAdjective = countVocBasAdjective + countVocAdjective
        countVocAdverb = countVocBasAdverb + countVocAdverb
        countVocPreposition = countVocBasPreposition + countVocPreposition
        countVocParticle = countVocBasParticle + countVocParticle
        countVocJunction = countVocBasJunction + countVocJunction
        countVocExpression = countVocBasExpression + countVocExpression
        countVocCooccurrence = countVocBasCooccurrence + countVocCooccurrence
        countVocGroup = countVocBasGroup + countFields

        ' public
        pubSizeBasPronomen = countVocBasPronomen
        pubSizeBasNomen = countVocBasNomen
        pubSizeBasVerb = countVocBasVerb
        pubSizeBasAdjective = countVocBasAdjective
        pubSizeBasVerb = countVocBasVerb
        pubSizeBasPreposition = countVocBasPreposition
        pubSizeBasParticle = countVocBasParticle
        pubSizeBasJunction = countVocBasJunction
        pubSizeBasExpression = countVocBasExpression
        pubSizeBasCooccurrence = countVocBasCooccurrence

        ' Rueckgabe
        readVocabulary = True

        ' Info
        If (fileType = "cooccurrence") Then
            ' Standard+Additional Vocabulary
            sumOfAll = countVocPronomen + countVocNomen + countVocVerb + countVocAdverb + _
            countVocAdjective + countVocPreposition + countVocParticle + countVocJunction
            MsgBox(formatPretty(countVocPronomen, 5) & " Pronouns" & vbCrLf & _
                   formatPretty(countVocNomen, 5) & " Nouns" & vbCrLf & _
                   formatPretty(countVocVerb, 5) & " Verbs" & vbCrLf & _
                   formatPretty(countVocAdverb, 5) & " Adverbs" & vbCrLf & _
                   formatPretty(countVocAdjective, 5) & " Adjectives" & vbCrLf & _
                   formatPretty(countVocPreposition, 5) & " Prepositions" & vbCrLf & _
                   formatPretty(countVocParticle, 5) & " Particles" & vbCrLf & _
                   formatPretty(countVocJunction, 5) & " Junctions" & vbCrLf & _
                    " " & vbCrLf & _
                   formatPretty(sumOfAll, 5) & " Words", MsgBoxStyle.Information, "Standard Vocabulary!")
        ElseIf (fileType = "extra") Then
            ' Extra Technical Vocabulary
            pubVocExtAvail(0) = _
                pubVocExtAvail(1) + pubVocExtAvail(2) + pubVocExtAvail(3) + pubVocExtAvail(4) + _
                pubVocExtAvail(5) + pubVocExtAvail(6) + pubVocExtAvail(7) + pubVocExtAvail(8) + _
                pubVocExtAvail(9) + pubVocExtAvail(10) + pubVocExtAvail(11) + pubVocExtAvail(12) + _
                pubVocExtAvail(13) + pubVocExtAvail(14) + pubVocExtAvail(15) + pubVocExtAvail(16) + _
                pubVocExtAvail(17) + pubVocExtAvail(18) + pubVocExtAvail(19) + pubVocExtAvail(20)
            MsgBox(formatPretty(pubVocExtAvail(1), 4) & " Astronomy" & vbCrLf & _
                   formatPretty(pubVocExtAvail(2), 4) & " Biology" & vbCrLf & _
                   formatPretty(pubVocExtAvail(3), 4) & " Chemestry" & vbCrLf & _
                   formatPretty(pubVocExtAvail(4), 4) & " Medicine" & vbCrLf & _
                   formatPretty(pubVocExtAvail(5), 4) & " Economy" & vbCrLf & _
                   formatPretty(pubVocExtAvail(6), 4) & " Geosciences" & vbCrLf & _
                   formatPretty(pubVocExtAvail(7), 4) & " History" & vbCrLf & _
                   formatPretty(pubVocExtAvail(8), 4) & " Informatics" & vbCrLf & _
                   formatPretty(pubVocExtAvail(9), 4) & " Jurisprudence" & vbCrLf & _
                   formatPretty(pubVocExtAvail(10), 4) & " Art/Culture" & vbCrLf & _
                   formatPretty(pubVocExtAvail(11), 4) & " Linguistics" & vbCrLf & _
                   formatPretty(pubVocExtAvail(12), 4) & " Mathematics" & vbCrLf & _
                   formatPretty(pubVocExtAvail(13), 4) & " Physics" & vbCrLf & _
                   formatPretty(pubVocExtAvail(14), 4) & " Religion" & vbCrLf & _
                   formatPretty(pubVocExtAvail(15), 4) & " Social Sciences" & vbCrLf & _
                   formatPretty(pubVocExtAvail(16), 4) & " Technology" & vbCrLf & _
                   formatPretty(pubVocExtAvail(17), 4) & " Music" & vbCrLf & _
                   formatPretty(pubVocExtAvail(18), 4) & " Philosophy" & vbCrLf & _
                   formatPretty(pubVocExtAvail(19), 4) & " Psychology" & vbCrLf & _
                   formatPretty(pubVocExtAvail(20), 4) & " Sports" & vbCrLf & _
                    " " & vbCrLf & _
                   formatPretty(pubVocExtAvail(0), 4) & " Words", MsgBoxStyle.Information, "Technical Vocabulary!")
        End If

    End Function

    Function readGrammar(ByVal xmlFile As String) As Grammar
        ' Read the XML-Coding of a Sentence
        Dim espDOM As New XmlDocument
        Dim numSentence As XmlNodeList
        Dim numSubject As XmlNodeList
        Dim numPredicate As XmlNodeList
        Dim numObject As XmlNodeList
        Dim numJunction As XmlNodeList
        Dim numParticle As XmlNodeList
        Dim numInterpunct As XmlNodeList
        Dim data00DOM As XmlNodeList
        Dim data01DOM As XmlNodeList
        Dim data02DOM As XmlNodeList
        Dim data03DOM As XmlNodeList
        Dim data04DOM As XmlNodeList
        Dim data05DOM As XmlNodeList
        Dim data06DOM As XmlNodeList
        Dim data07DOM As XmlNodeList
        Dim data08DOM As XmlNodeList
        Dim data09DOM As XmlNodeList
        Dim data10DOM As XmlNodeList
        Dim data11DOM As XmlNodeList
        Dim data12DOM As XmlNodeList
        Dim data13DOM As XmlNodeList
        Dim data14DOM As XmlNodeList
        Dim data15DOM As XmlNodeList
        Dim data16DOM As XmlNodeList
        Dim data17DOM As XmlNodeList
        Dim data18DOM As XmlNodeList
        Dim locGrammar As New Grammar
        Dim oneSentence As XmlNode
        Dim strName As String
        Dim strSatz As String
        Dim i As Integer
        Dim j As Integer

        ' Redimensionierung der Datenfelder Grammatik
        ' Satz
        ReDim locGrammar._Sentence(pubSizeSentence)
        ' Subjekt
        ReDim locGrammar._Subject(pubSizeSubject)
        ' Preadikat
        ReDim locGrammar._Predicate(pubSizePredicate)
        ' Objekt
        ReDim locGrammar._Object(pubSizeObject)
        ' Junktion
        ReDim locGrammar._Junction(pubSizeGJunction)
        ' Partikel
        ReDim locGrammar._Particle(pubSizeGParticle)
        ' Satzzeichen
        ReDim locGrammar._Interpunct(pubSizeInterpunct)

        ' Datei-Zugriff
        Try
            espDOM.Load(xmlFile)
            locGrammar._Done = True
        Catch
            locGrammar._Done = False
            MsgBox("File " & xmlFile & " could not be read (XML Syntax: " & Err.Description & ")!", vbCritical, "Grammar Parser")
            readGrammar = locGrammar
            Exit Function

        End Try


        ' Parsen
        Try

            ' Original
            data00DOM = espDOM.GetElementsByTagName("Original")
            locGrammar._Original = data00DOM.Item(0).InnerText

            ' Anzahl (Teil-)Saetze
            strSatz = ""
            numSentence = espDOM.GetElementsByTagName("Sentence")
            locGrammar.countSentence = numSentence.Count
            For i = 1 To locGrammar.countSentence
                oneSentence = numSentence.Item(i - 1)
                For j = 1 To oneSentence.ChildNodes.Count
                    strName = oneSentence.ChildNodes(j - 1).Name
                    If (strName = "Subjekt") Then
                        locGrammar._Sentence(i)._numSubjects = locGrammar._Sentence(i)._numSubjects + 1
                    ElseIf (strName = "Preadikat") Then
                        locGrammar._Sentence(i)._numPredicates = locGrammar._Sentence(i)._numPredicates + 1
                    ElseIf (strName = "Objekt") Then
                        locGrammar._Sentence(i)._numObjects = locGrammar._Sentence(i)._numObjects + 1
                    ElseIf (strName = "Junktion") Then
                        locGrammar._Sentence(i)._numJunctions = locGrammar._Sentence(i)._numJunctions + 1
                    ElseIf (strName = "Partikel") Then
                        locGrammar._Sentence(i)._numParticles = locGrammar._Sentence(i)._numParticles + 1
                    ElseIf (strName = "Interpunktion") Then
                        locGrammar._Sentence(i)._numInterpuncts = locGrammar._Sentence(i)._numInterpuncts + 1
                    End If
                Next
                ' kumulative Summe
                If (i > 1) Then
                    locGrammar._Sentence(i)._cumNumSubjects = locGrammar._Sentence(i - 1)._cumNumSubjects + locGrammar._Sentence(i - 1)._numSubjects
                    locGrammar._Sentence(i)._cumNumPredicates = locGrammar._Sentence(i - 1)._cumNumPredicates + locGrammar._Sentence(i - 1)._numPredicates
                    locGrammar._Sentence(i)._cumNumObjects = locGrammar._Sentence(i - 1)._cumNumObjects + locGrammar._Sentence(i - 1)._numObjects
                    locGrammar._Sentence(i)._cumNumJunctions = locGrammar._Sentence(i - 1)._cumNumJunctions + locGrammar._Sentence(i - 1)._numJunctions
                    locGrammar._Sentence(i)._cumNumParticles = locGrammar._Sentence(i - 1)._cumNumParticles + locGrammar._Sentence(i - 1)._numParticles
                    locGrammar._Sentence(i)._cumNumInterpuncts = locGrammar._Sentence(i - 1)._cumNumInterpuncts + locGrammar._Sentence(i - 1)._numInterpuncts
                Else
                    locGrammar._Sentence(i)._cumNumSubjects = 0
                    locGrammar._Sentence(i)._cumNumPredicates = 0
                    locGrammar._Sentence(i)._cumNumObjects = 0
                    locGrammar._Sentence(i)._cumNumJunctions = 0
                    locGrammar._Sentence(i)._cumNumParticles = 0
                    locGrammar._Sentence(i)._cumNumInterpuncts = 0
                End If
                ' Anzeige
                strSatz = strSatz & i.ToString & ": " & locGrammar._Sentence(i)._numSubjects.ToString & " Subject(s), " & _
                locGrammar._Sentence(i)._numPredicates.ToString & " Predicate(s), " & _
                locGrammar._Sentence(i)._numObjects.ToString & " Object(s), " & _
                locGrammar._Sentence(i)._numJunctions.ToString & " Junction(s), " & _
                locGrammar._Sentence(i)._numParticles.ToString & " Particle(s), " & _
                locGrammar._Sentence(i)._numInterpuncts.ToString & " Punctuation Mark(s) " & vbCrLf
            Next
            MsgBox("Sentence consisting of " & locGrammar.countSentence & " partial sentence(s)" & vbCrLf & strSatz, MsgBoxStyle.Information, "Grammar Parser")

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

            ' Subjekt
            numSubject = espDOM.GetElementsByTagName("Subjekt")
            locGrammar.countSubject = numSubject.Count
            data01DOM = espDOM.GetElementsByTagName("SubNominativ")
            data02DOM = espDOM.GetElementsByTagName("SubType")
            data03DOM = espDOM.GetElementsByTagName("SubGenus")
            data04DOM = espDOM.GetElementsByTagName("SubNumerus")
            data05DOM = espDOM.GetElementsByTagName("SubArtikel")
            data06DOM = espDOM.GetElementsByTagName("SubAdjektiv")
            data07DOM = espDOM.GetElementsByTagName("SubAdjType")
            data08DOM = espDOM.GetElementsByTagName("SubAdjKomp")
            data09DOM = espDOM.GetElementsByTagName("SubAdverb")
            data10DOM = espDOM.GetElementsByTagName("SubAdvType")
            data11DOM = espDOM.GetElementsByTagName("SubAdvKomp")
            data12DOM = espDOM.GetElementsByTagName("SubPartizip")
            data13DOM = espDOM.GetElementsByTagName("SubParTemp")
            data14DOM = espDOM.GetElementsByTagName("SubParMod")
            data15DOM = espDOM.GetElementsByTagName("SubParGenV")
            data16DOM = espDOM.GetElementsByTagName("SubDuplikat")
            For i = 1 To locGrammar.countSubject
                locGrammar._Subject(i)._Nominativ = data01DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Type = data02DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Genus = data03DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Number = data04DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Article = data05DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Adjective = data06DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._AdjType = data07DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._AdjKomp = data08DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Adverb = data09DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._AdvType = data10DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._AdvKomp = data11DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Participe = data12DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._ParTemp = data13DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._ParMod = data14DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._ParGenV = data15DOM.Item(i - 1).InnerText
                locGrammar._Subject(i)._Duplicate = data16DOM.Item(i - 1).InnerText
            Next

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

            ' Objekt
            numObject = espDOM.GetElementsByTagName("Objekt")
            locGrammar.countObject = numObject.Count
            data01DOM = espDOM.GetElementsByTagName("ObjNominativ")
            data02DOM = espDOM.GetElementsByTagName("ObjType")
            data03DOM = espDOM.GetElementsByTagName("ObjKasus")
            data04DOM = espDOM.GetElementsByTagName("ObjGenus")
            data05DOM = espDOM.GetElementsByTagName("ObjNumerus")
            data06DOM = espDOM.GetElementsByTagName("ObjArtikel")
            data07DOM = espDOM.GetElementsByTagName("ObjAdjektiv")
            data08DOM = espDOM.GetElementsByTagName("ObjAdjType")
            data09DOM = espDOM.GetElementsByTagName("ObjAdjKomp")
            data10DOM = espDOM.GetElementsByTagName("ObjAdverb")
            data11DOM = espDOM.GetElementsByTagName("ObjAdvType")
            data12DOM = espDOM.GetElementsByTagName("ObjAdvKomp")
            data13DOM = espDOM.GetElementsByTagName("ObjPartizip")
            data14DOM = espDOM.GetElementsByTagName("ObjParTemp")
            data15DOM = espDOM.GetElementsByTagName("ObjParMod")
            data16DOM = espDOM.GetElementsByTagName("ObjParGenV")
            data17DOM = espDOM.GetElementsByTagName("ObjPraeposition")
            data18DOM = espDOM.GetElementsByTagName("ObjDuplikat")

            For i = 1 To locGrammar.countObject
                locGrammar._Object(i)._Nominativ = data01DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Type = data02DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Case = data03DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Genus = data04DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Number = data05DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Article = data06DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Adjective = data07DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._AdjType = data08DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._AdjKomp = data09DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Adverb = data10DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._AdvType = data11DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._AdvKomp = data12DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Participe = data13DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._ParTemp = data14DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._ParMod = data15DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._ParGenV = data16DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Preposition = data17DOM.Item(i - 1).InnerText
                locGrammar._Object(i)._Duplicate = data18DOM.Item(i - 1).InnerText
            Next

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

            ' Preadikat
            numPredicate = espDOM.GetElementsByTagName("Preadikat")
            locGrammar.countPredicate = numPredicate.Count
            data01DOM = espDOM.GetElementsByTagName("PreInfinitiv")
            data02DOM = espDOM.GetElementsByTagName("PrePerson")
            data03DOM = espDOM.GetElementsByTagName("PreNumerus")
            data04DOM = espDOM.GetElementsByTagName("PreTempus")
            data05DOM = espDOM.GetElementsByTagName("PreModus")
            data06DOM = espDOM.GetElementsByTagName("PreGenusVerbi")
            data07DOM = espDOM.GetElementsByTagName("PreSpezValenz")
            data08DOM = espDOM.GetElementsByTagName("PreAdverb")
            data09DOM = espDOM.GetElementsByTagName("PreAdvType")
            data10DOM = espDOM.GetElementsByTagName("PreAdvKomp")
            data11DOM = espDOM.GetElementsByTagName("PreDuplikat")
            For i = 1 To locGrammar.countPredicate
                locGrammar._Predicate(i)._Infinitiv = data01DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._Person = data02DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._Number = data03DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._Tempus = data04DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._Modus = data05DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._GenusVerbi = data06DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._SpezValenz = data07DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._Adverb = data08DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._AdvType = data09DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._AdvKomp = data10DOM.Item(i - 1).InnerText
                locGrammar._Predicate(i)._Duplicate = data11DOM.Item(i - 1).InnerText
            Next

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

            ' Junktion
            numJunction = espDOM.GetElementsByTagName("Junktion")
            locGrammar.countJunction = numJunction.Count
            data01DOM = espDOM.GetElementsByTagName("JunText")
            data02DOM = espDOM.GetElementsByTagName("JunType")
            For i = 1 To locGrammar.countJunction
                locGrammar._Junction(i)._Text = data01DOM.Item(i - 1).InnerText
                locGrammar._Junction(i)._Type = data02DOM.Item(i - 1).InnerText
            Next

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

            ' Partikel
            numParticle = espDOM.GetElementsByTagName("Partikel")
            locGrammar.countParticle = numParticle.Count
            data01DOM = espDOM.GetElementsByTagName("ParText")
            data02DOM = espDOM.GetElementsByTagName("ParType")
            For i = 1 To locGrammar.countParticle
                locGrammar._Particle(i)._Text = data01DOM.Item(i - 1).InnerText
                locGrammar._Particle(i)._Type = data02DOM.Item(i - 1).InnerText
            Next

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

            ' Satzzeichen
            numInterpunct = espDOM.GetElementsByTagName("Interpunktion")
            locGrammar.countInterpunct = numInterpunct.Count
            data01DOM = espDOM.GetElementsByTagName("IntText")
            data02DOM = espDOM.GetElementsByTagName("IntType")
            For i = 1 To locGrammar.countInterpunct
                locGrammar._Interpunct(i)._Text = data01DOM.Item(i - 1).InnerText
                locGrammar._Interpunct(i)._Type = data02DOM.Item(i - 1).InnerText
            Next

            data01DOM = Nothing
            data02DOM = Nothing
            data03DOM = Nothing
            data04DOM = Nothing
            data05DOM = Nothing
            data06DOM = Nothing
            data07DOM = Nothing
            data08DOM = Nothing
            data09DOM = Nothing
            data10DOM = Nothing
            data11DOM = Nothing
            data12DOM = Nothing
            data13DOM = Nothing
            data14DOM = Nothing
            data15DOM = Nothing
            data16DOM = Nothing
            data17DOM = Nothing
            data18DOM = Nothing

        Catch ex As Exception
            locGrammar._Done = False
            MsgBox("File " & xmlFile & " could not be read (Grammatic Elements: " & Err.Description & ")!", vbCritical, "Grammar Parser")
            readGrammar = locGrammar
            Exit Function

        End Try

        ' Rueckgabe
        readGrammar = locGrammar

    End Function

    Public Function readCoocLink(arg As Integer) As Boolean
        ' Lesen der Link-Dateien fuer Kookkurrenzen
        Dim espDOM As New XmlDocument
        Dim xmlCooccurrence As XmlNodeList
        Dim numCooccurrence As Integer
        Dim wtyp As String
        Dim wind As Long
        Dim i As Integer
        Dim tmpVocPronomen As New clsVocabularyPro

        ' Kookkurrenzen: Links
        Try
            espDOM.Load(pubVocaLinkingFile)
            _isVocDone = True
        Catch
            _isVocDone = False
            MsgBox("File " & pubVocaLinkingFile & " could not be read (" & Err.Description & ")", vbCritical, "Vocabulary Links")
            readCoocLink = False
            Exit Function

        End Try

        ' Kookkurrenzen
        xmlCooccurrence = espDOM.GetElementsByTagName("Kookkurrenz")
        numCooccurrence = xmlCooccurrence.Count

        For i = 1 To numCooccurrence
            ' Daten uebernehmen
            wtyp = xmlCooccurrence.Item(i - 1).Attributes(1).InnerText
            wind = xmlCooccurrence.Item(i - 1).Attributes(2).InnerText
            If (wtyp = "Pro") Then
                If (wind < 0) Then wind = pubSizeBasPronomen - wind
                pubVocabularyPro(wind)._CooPronomen = pubVocabularyPro(wind)._CooPronomen & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Nom") Then
                If (wind < 0) Then wind = pubSizeBasNomen - wind
                pubVocabularyNom(wind)._CooNomen = pubVocabularyNom(wind)._CooNomen & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Ver") Then
                If (wind < 0) Then wind = pubSizeBasVerb - wind
                pubVocabularyVer(wind)._CooVerb = pubVocabularyVer(wind)._CooVerb & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Adj") Then
                If (wind < 0) Then wind = pubSizeBasAdjective - wind
                pubVocabularyAdj(wind)._CooAdjective = pubVocabularyAdj(wind)._CooAdjective & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Adv") Then
                If (wind < 0) Then wind = pubSizeBasAdverb - wind
                pubVocabularyAdv(wind)._CooAdverb = pubVocabularyAdv(wind)._CooAdverb & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Pre") Then
                If (wind < 0) Then wind = pubSizeBasPreposition - wind
                pubVocabularyPre(wind)._CooPreposition = pubVocabularyPre(wind)._CooPreposition & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Par") Then
                If (wind < 0) Then wind = pubSizeBasParticle - wind
                pubVocabularyPar(wind)._CooParticle = pubVocabularyPar(wind)._CooParticle & xmlCooccurrence.Item(i - 1).InnerText & ";"
            ElseIf (wtyp = "Jun") Then
                If (wind < 0) Then wind = pubSizeBasJunction - wind
                pubVocabularyJun(wind)._CooJunction = pubVocabularyJun(wind)._CooJunction & xmlCooccurrence.Item(i - 1).InnerText & ";"
            End If

        Next

        ' Rueckgabe
        readCoocLink = True

    End Function

    Public Sub initVocabulary(ByVal arg As Integer)
        ' Initialisation of the Data Structures of the Vocabulary
        Dim tmpVocPronomen As New clsVocabularyPro
        Dim tmpVocNomen As New clsVocabularyNom
        Dim tmpVocVerb As New clsVocabularyVer
        Dim tmpVocAdverb As New clsVocabularyAdv
        Dim tmpVocAdjective As New clsVocabularyAdj
        Dim tmpVocPreposition As New clsVocabularyPre
        Dim tmpVocParticle As New clsVocabularyPar
        Dim tmpVocJunction As New clsVocabularyJun
        Dim tmpVocExpression As New clsVocabularyExp
        Dim tmpVocCooccurrence As New clsVocabularyCoo
        Dim tmpVocGroup As New clsVocabularyGrp

        ' Pronomen
        pubVocabularyPro.Add(tmpVocPronomen)

        ' Nomen
        pubVocabularyNom.Add(tmpVocNomen)

        ' Verb
        pubVocabularyVer.Add(tmpVocVerb)

        ' Adverb
        pubVocabularyAdv.Add(tmpVocAdverb)

        ' Adjektiv
        pubVocabularyAdj.Add(tmpVocAdjective)

        ' Preaposition
        pubVocabularyPre.Add(tmpVocPreposition)

        ' Partikel
        pubVocabularyPar.Add(tmpVocParticle)

        ' Junktion
        pubVocabularyJun.Add(tmpVocJunction)

        ' Expression
        pubVocabularyExp.Add(tmpVocExpression)

        ' Kookkurrenz
        pubVocabularyCoo.Add(tmpVocCooccurrence)

        ' Gruppe
        pubVocabularyGrp.Add(tmpVocGroup)

    End Sub

    Public Sub redimGrammar(ByVal arg As Integer)
        ' Redimensioning of the Data Structures for Grammar
        ' Satz
        ReDim pubDataGrammar._Sentence(pubSizeSentence)
        ' Subjekt
        ReDim pubDataGrammar._Subject(pubSizeSubject)
        ' Preadikat
        ReDim pubDataGrammar._Predicate(pubSizePredicate)
        ' Objekt
        ReDim pubDataGrammar._Object(pubSizeObject)
        ' Junktion
        ReDim pubDataGrammar._Junction(pubSizeGJunction)
        ' Partikel
        ReDim pubDataGrammar._Particle(pubSizeGParticle)
        ' Satzzeichen
        ReDim pubDataGrammar._Interpunct(pubSizeInterpunct)

    End Sub

    Public Sub initLanguages(ByVal arg As Integer)
        ' Initialisation of the Language Names
        pubLanguage(0) = "Esperanto"
        pubLanguage(1) = "Deutsch"
        pubLanguage(2) = "English"
        pubLanguage(3) = "Français"
        pubLanguage(4) = "Español"
        pubLanguage(5) = "Italiano"
        pubLanguage(6) = "Português"
        pubLanguage(7) = "Dansk"
        pubLanguage(8) = "Svenska"
        pubLanguage(9) = "Ελληνικά"
        pubLanguage(10) = "Русский"
        pubLanguage(11) = "Polski"
        pubLanguage(12) = "Hrvatski"
        pubLanguage(13) = "My Language"

    End Sub

    Public Sub initThemes(ByVal arg As Integer)
        ' Initialisation of the Vocabulary Theme Names
        pubVocThemes(0) = 26
        pubVocThemes(1) = "Nations/Languages"
        pubVocThemes(2) = "Human Body/Senses"
        pubVocThemes(3) = "Health/Medicine"
        pubVocThemes(4) = "Psych./Brain/Behaviour"
        pubVocThemes(5) = "Food/Clothing"
        pubVocThemes(6) = "Home/Househould"
        pubVocThemes(7) = "Family/Private Life"
        pubVocThemes(8) = "Education/Training"
        pubVocThemes(9) = "Occupation/Tools"
        pubVocThemes(10) = "Leisure/Sports/Events"
        pubVocThemes(11) = "Travelling/Gastronomy"
        pubVocThemes(12) = "Traffic/Transportation"
        pubVocThemes(13) = "State/Law/Society"
        pubVocThemes(14) = "Economy/Financial World"
        pubVocThemes(15) = "Communication/Media"
        pubVocThemes(16) = "Art/Music/Literature"
        pubVocThemes(17) = "History/Religion/Phil."
        pubVocThemes(18) = "Earth/Nature/Biology"
        pubVocThemes(19) = "Nat. Sciences/Technique"
        pubVocThemes(20) = "Space/Time"
        pubVocThemes(21) = "Colors/Forms"
        pubVocThemes(22) = "Quantity/Numbers/Units"
        pubVocThemes(23) = "Properties/Modalities"
        pubVocThemes(24) = "Speech/Grammar"
        pubVocThemes(25) = "Functional Words"
        pubVocThemes(26) = "Expressions(Idioms)"

    End Sub

    Public Sub initExtNames(arg As Integer)
        ' Initialisation of the Extra Vocabulary Names
        pubVocExtNames(0) = 20
        pubVocExtNames(1) = "Astronomy"
        pubVocExtNames(2) = "Biology"
        pubVocExtNames(3) = "Chemestry"
        pubVocExtNames(4) = "Medicine"
        pubVocExtNames(5) = "Economy"
        pubVocExtNames(6) = "Geosciences"
        pubVocExtNames(7) = "History"
        pubVocExtNames(8) = "Informatics"
        pubVocExtNames(9) = "Jurisprudence"
        pubVocExtNames(10) = "Art/Culture"
        pubVocExtNames(11) = "Linguistics"
        pubVocExtNames(12) = "Mathematics"
        pubVocExtNames(13) = "Physics"
        pubVocExtNames(14) = "Religion"
        pubVocExtNames(15) = "Social Sciences"
        pubVocExtNames(16) = "Technology"
        pubVocExtNames(17) = "Music"
        pubVocExtNames(18) = "Philosophy"
        pubVocExtNames(19) = "Psychology"
        pubVocExtNames(20) = "Sports"

    End Sub

    Public Sub initFlagInfo(arg As Integer)
        ' Flaggen-Info lesen
        Dim flagInfoFullPath As String = pubDirFlagIcons & "\" & "lang2flag.txt"
        Dim TextLine As String
        Dim SplitStr() As String
        Dim cnt As Integer

        If System.IO.File.Exists(flagInfoFullPath) = True Then

            Dim objReader As New System.IO.StreamReader(flagInfoFullPath)

            cnt = 0
            TextLine = ""
            Do While objReader.Peek() <> -1

                cnt = cnt + 1
                TextLine = objReader.ReadLine() & vbNewLine

                SplitStr = TextLine.Split(":")
                pubFlagInfo(1, cnt) = SplitStr(0)
                pubFlagInfo(2, cnt) = SplitStr(1)

            Loop

            pubFlagInfo(0, 0) = cnt

        Else

            MessageBox.Show("File " & flagInfoFullPath & " could not be opened.")

        End If

        Directory.SetCurrentDirectory(Application.StartupPath)

    End Sub

    Public Function getNiveau(type As Integer, index As Long) As String
        ' get Niveau of word
        Dim niveau As String

        niveau = "--"
        If (type = WordType.Pronomen) Then
            niveau = pubVocabularyPro(index)._NivPronomen
        ElseIf (type = WordType.Nomen) Then
            niveau = pubVocabularyNom(index)._NivNomen
        ElseIf (type = WordType.Verb) Then
            niveau = pubVocabularyVer(index)._NivVerb
        ElseIf (type = WordType.Adjective) Then
            niveau = pubVocabularyAdj(index)._NivAdjective
        ElseIf (type = WordType.Adverb) Then
            niveau = pubVocabularyAdv(index)._NivAdverb
        ElseIf (type = WordType.Preposition) Then
            niveau = pubVocabularyPre(index)._NivPreposition
        ElseIf (type = WordType.Particle) Then
            niveau = pubVocabularyPar(index)._NivParticle
        ElseIf (type = WordType.Junction) Then
            niveau = pubVocabularyJun(index)._NivJunction
        ElseIf (type = WordType.Expression) Then
            niveau = pubVocabularyExp(index)._NivExpression
        ElseIf (type = WordType.Cooccurrence) Then
            niveau = pubVocabularyCoo(index)._NivCooccurrence
        Else
            niveau = "--"
        End If

        ' give back
        getNiveau = niveau

    End Function

    Private Function getNivInd(niveau As String) As Integer
        ' get Niveau Index
        Dim index As Integer

        index = 0
        If (niveau = "A1") Then
            index = 1
        ElseIf (niveau = "A2") Then
            index = 2
        ElseIf (niveau = "B1") Then
            index = 3
        ElseIf (niveau = "B2") Then
            index = 4
        ElseIf (niveau = "C1") Then
            index = 5
        ElseIf (niveau = "C2" Or niveau.StartsWith("E")) Then
            index = 6
        Else
            index = 0
        End If

        ' give back
        getNivInd = index

    End Function

    Public Function importAnyFromTextFile(textFileFullPath As String, val As Integer) As Long
        ' Import of Words for AnyLang from Text File
        Dim regexWhiteSpace As Regex = New Regex("\s+")
        Dim tmpStr As String
        Dim arrStr() As String
        Dim langInd As Integer
        Dim tmpLang As String
        Dim tmpComm As String
        Dim tmpType As String
        Dim enmType As Integer
        Dim tmpIndex As Long
        Dim tmpEng As String
        Dim tmpWord As String
        Dim countWords As Long
        Dim countLines As Long
        Dim wordDone As Boolean
        Dim s As Integer

        ' index of AnyLang
        langInd = 13

        ' open File
        Dim fs01 As FileStream = New FileStream(textFileFullPath, FileMode.Open, FileAccess.Read)
        Dim tr01 As TextReader = New StreamReader(fs01)

        ' read File
        tmpStr = tr01.ReadLine()
        If (tmpStr <> "#DecaleonImportFile#") Then
            MsgBox("Wrong File Format? Please read the Manual!", MsgBoxStyle.Exclamation, "Special Text File Format")
            Return countWords
            Exit Function

        End If
        tmpLang = tr01.ReadLine()
        tmpComm = tr01.ReadLine()
        MsgBox("Importing " & tmpLang & " (" & tmpComm & ") ", MsgBoxStyle.Information, "Start Run-Time Import")
        arrStr = regexWhiteSpace.Split(tmpLang)
        pubImpLang = arrStr(0)
        countWords = 0
        countLines = 3
        While (tr01.Peek() <> -1)
            tmpStr = tr01.ReadLine()
            arrStr = regexWhiteSpace.Split(tmpStr)
            countLines = countLines + 1
            If (arrStr.Count < 5) Then
                MsgBox("Format of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!" & vbCrLf & _
                       "Format is 'Count Type Index Eng_Meaning AnyLang'", MsgBoxStyle.Critical, "Import aborted")
                Exit While
            End If
            tmpType = arrStr(1)
            tmpIndex = CLng(arrStr(2))
            tmpEng = arrStr(3)
            tmpWord = arrStr(4)
            For s = 5 To arrStr.Count - 1
                tmpWord = tmpWord & " " & arrStr(s)
            Next
            ' set Data, Indices
            pubLanguage(13) = tmpLang
            wordDone = False
            If (tmpWord <> "***") Then
                If (tmpType = "Pro") Then
                    If (tmpIndex <= pubSizePronomen(LangName.Deutsch)) Then
                        If (pubVocabularyPro(tmpIndex)._AnyPronomen = "" Or _
                            pubVocabularyPro(tmpIndex)._AnyPronomen = "***" Or _
                            pubVocabularyPro(tmpIndex)._AnyPronomen = "###") Then
                            pubVocabularyPro(tmpIndex)._AnyPronomen = tmpWord
                            pubSizePronomen(langInd) = pubSizePronomen(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Pronomen
                ElseIf (tmpType = "Nom") Then
                    If (tmpIndex <= pubSizeNomen(LangName.Deutsch)) Then
                        If (pubVocabularyNom(tmpIndex)._AnyNomen = "" Or _
                            pubVocabularyNom(tmpIndex)._AnyNomen = "***" Or _
                            pubVocabularyNom(tmpIndex)._AnyNomen = "###") Then
                            pubVocabularyNom(tmpIndex)._AnyNomen = tmpWord
                            pubSizeNomen(langInd) = pubSizeNomen(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Nomen
                ElseIf (tmpType = "Ver") Then
                    If (tmpIndex <= pubSizeVerb(LangName.Deutsch)) Then
                        If (pubVocabularyVer(tmpIndex)._AnyVerb = "" Or _
                            pubVocabularyVer(tmpIndex)._AnyVerb = "***" Or _
                            pubVocabularyVer(tmpIndex)._AnyVerb = "###") Then
                            pubVocabularyVer(tmpIndex)._AnyVerb = tmpWord
                            pubSizeVerb(langInd) = pubSizeVerb(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Verb
                ElseIf (tmpType = "Adv") Then
                    If (tmpIndex <= pubSizeAdverb(LangName.Deutsch)) Then
                        If (pubVocabularyAdv(tmpIndex)._AnyAdverb = "" Or _
                            pubVocabularyAdv(tmpIndex)._AnyAdverb = "***" Or _
                            pubVocabularyAdv(tmpIndex)._AnyAdverb = "###") Then
                            pubVocabularyAdv(tmpIndex)._AnyAdverb = tmpWord
                            pubSizeAdverb(langInd) = pubSizeAdverb(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Adverb
                ElseIf (tmpType = "Adj") Then
                    If (tmpIndex <= pubSizeAdjective(LangName.Deutsch)) Then
                        If (pubVocabularyAdj(tmpIndex)._AnyAdjective = "" Or _
                            pubVocabularyAdj(tmpIndex)._AnyAdjective = "***" Or _
                            pubVocabularyAdj(tmpIndex)._AnyAdjective = "###") Then
                            pubVocabularyAdj(tmpIndex)._AnyAdjective = tmpWord
                            pubSizeAdjective(langInd) = pubSizeAdjective(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Adjective
                ElseIf (tmpType = "Pre") Then
                    If (tmpIndex <= pubSizePreposition(LangName.Deutsch)) Then
                        If (pubVocabularyPre(tmpIndex)._AnyPreposition = "" Or _
                            pubVocabularyPre(tmpIndex)._AnyPreposition = "***" Or _
                            pubVocabularyPre(tmpIndex)._AnyPreposition = "###") Then
                            pubVocabularyPre(tmpIndex)._AnyPreposition = tmpWord
                            pubSizePreposition(langInd) = pubSizePreposition(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Preposition
                ElseIf (tmpType = "Par") Then
                    If (tmpIndex <= pubSizeParticle(LangName.Deutsch)) Then
                        If (pubVocabularyPar(tmpIndex)._AnyParticle = "" Or _
                            pubVocabularyPar(tmpIndex)._AnyParticle = "***" Or _
                            pubVocabularyPar(tmpIndex)._AnyParticle = "###") Then
                            pubVocabularyPar(tmpIndex)._AnyParticle = tmpWord
                            pubSizeParticle(langInd) = pubSizeParticle(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Particle
                ElseIf (tmpType = "Jun") Then
                    If (tmpIndex <= pubSizeJunction(LangName.Deutsch)) Then
                        If (pubVocabularyJun(tmpIndex)._AnyJunction = "" Or _
                            pubVocabularyJun(tmpIndex)._AnyJunction = "***" Or _
                            pubVocabularyJun(tmpIndex)._AnyJunction = "###") Then
                            pubVocabularyJun(tmpIndex)._AnyJunction = tmpWord
                            pubSizeJunction(langInd) = pubSizeJunction(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Junction
                ElseIf (tmpType = "Exp") Then
                    If (tmpIndex <= pubSizeExpression(LangName.Deutsch)) Then
                        If (pubVocabularyExp(tmpIndex)._AnyExpression = "" Or _
                            pubVocabularyExp(tmpIndex)._AnyExpression = "***" Or _
                            pubVocabularyExp(tmpIndex)._AnyExpression = "###") Then
                            pubVocabularyExp(tmpIndex)._AnyExpression = tmpWord
                            pubSizeExpression(langInd) = pubSizeExpression(langInd) + 1
                            wordDone = True
                        End If
                    Else
                        MsgBox("Index of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                               MsgBoxStyle.Critical, "Word ignored")
                    End If
                    enmType = WordType.Expression
                Else
                    MsgBox("Word Type of Line " & countLines.ToString & " (Word " & (countLines - 3).ToString & ") is not valid!", _
                            MsgBoxStyle.Critical, "Word ignored")
                End If
                If (wordDone = True) Then
                    pubSizeNiveau(getNivInd(getNiveau(enmType, tmpIndex)), langInd) = pubSizeNiveau(getNivInd(getNiveau(enmType, tmpIndex)), langInd) + 1
                    countWords = countWords + 1
                End If
            End If

        End While

        ' close File
        tr01.Close()
        fs01.Close()

        Directory.SetCurrentDirectory(Application.StartupPath)

        ' return Value
        importAnyFromTextFile = countWords

    End Function

    Public Function importSemanticGroupAll(textFileFullPath As String, val As Integer) As Boolean
        ' Import of Semantic Group Additional Information
        Dim regexWhiteSpace As Regex = New Regex("\t")
        Dim tmpStr As String
        Dim arrStr() As String
        Dim countGroups As Integer
        Dim countSubthemes As Integer
        Dim g As Integer

        ' open File
        Dim fs01 As FileStream = New FileStream(textFileFullPath, FileMode.Open, FileAccess.Read)
        Dim tr01 As TextReader = New StreamReader(fs01, System.Text.Encoding.UTF8)

        ' Init
        countGroups = 0
        countSubthemes = 0

        tmpStr = ""
        'While (tr01.Peek() <> -1)
        tmpStr = tr01.ReadLine()
        ' Gruppen-Information
        While (tmpStr.StartsWith("F001") = False)
            tmpStr = tr01.ReadLine()

        End While
        While (tmpStr.StartsWith("END-----") = False)
            If (tmpStr.StartsWith("--------") = False) Then
                arrStr = regexWhiteSpace.Split(tmpStr)
                ' Zuordnung zu bestehenden Gruppen
                For g = 1 To 2375   ' 725+900+750 Gruppen
                    If (pubVocabularyGrp(g)._GrpNumber = arrStr(0)) Then
                        countGroups = countGroups + 1
                        pubVocabularyGrp(g)._GrpAllTheme = arrStr(1)
                        pubVocabularyGrp(g)._GrpAllName(1) = arrStr(3)
                        pubVocabularyGrp(g)._GrpAllName(2) = arrStr(arrStr.Length - 1)
                        Exit For

                    End If

                Next

            End If

            tmpStr = tr01.ReadLine()

        End While
        ' Themen-Information
        While (tmpStr.StartsWith("-A/01") = False)
            tmpStr = tr01.ReadLine()

        End While
        While (tmpStr.StartsWith("END-----") = False)
            If (tmpStr.StartsWith("--------") = False) Then
                arrStr = regexWhiteSpace.Split(tmpStr)
                ' Subthemen: ID, Deu, Eng
                countSubthemes = countSubthemes + 1
                pubVocSubThemes(countSubthemes, 1) = arrStr(0)  ' Subtheme
                pubVocSubThemes(countSubthemes, 2) = arrStr(2)  ' German
                pubVocSubThemes(countSubthemes, 3) = arrStr(arrStr.Length - 1)  ' English
                pubVocSubThemes(countSubthemes, 4) = arrStr(1)  ' Count
            End If

            tmpStr = tr01.ReadLine()

        End While

        'End While

        ' close File
        tr01.Close()
        fs01.Close()

        Directory.SetCurrentDirectory(Application.StartupPath)

        ' return Value
        importSemanticGroupAll = True

    End Function

    Public Function exportGroupsBySubthemes(texFile As String, fontSize As Integer, titGerEng As Integer, Lang1 As Integer, Lang21 As Integer, Lang22 As Integer, val As Integer) As ThemBook
        ' Export Thematic Groups sorted by Subthemes (LaTeX)
        ' not for Esperanto
        ' - texFile: Name der LaTeX-Datei
        ' - fontSize: 0 = 10pt, 1 = 11pt, 2 = 12pt
        ' - titGerEng: 1 = Ger, 2 = Eng
        ' - Lang1: From Language (Deutsch, Englisch)
        ' - Lang21: 1st To Language (1-12)
        ' - Lang22: 2nd To Language (1-12), -1 = inaktiv
        ' - val: minimum words per table: 1
        Dim retVal As ThemBook
        Dim Datum As Date
        Dim Zeit As Date
        Dim headerLang(2) As String
        Dim titleMain(2) As String
        Dim wordIndex As Long
        Dim wordType As String
        Dim wordText1 As String
        Dim wordText21 As String
        Dim wordText22 As String
        Dim wordTextEnviro11, wordTextEnviro12 As String
        Dim wordTextEnviro21, wordTextEnviro22 As String
        Dim titleText1(2) As String
        Dim titleText21(2) As String
        Dim titleText22(2) As String
        Dim indexText(2) As String
        Dim newSpace As String
        Dim currMembs As Integer
        Dim currLines As Integer
        Dim sumLines As Integer
        Dim maxLines(2) As Integer
        Dim chapLines(2) As Integer
        Dim sectLines(2) As Integer
        Dim tableLines(2) As Integer
        Dim spaceLines(2) As Integer
        Dim newChapter As Boolean
        Dim newSection As Boolean
        Dim countTables(3) As Integer
        Dim countWords(3) As Long
        Dim strDatum As String
        Dim strZeit As String
        Dim g, t, w As Integer
        Dim testText(2) As String
        Dim da = Convert.ToChar(&H22)   ' Doppelte Anfuehrungszeichen
        Dim amp = Convert.ToChar(&H26)  ' Kaufmaennisches Und

        ' aktuelles Datum
        Datum = System.DateTime.Today.Date
        strDatum = Datum.Day & "." & Datum.Month & "." & Datum.Year

        ' aktuelle Uhrzeit
        Zeit = Now()
        strZeit = Format(Zeit.Hour, "00") & ":" & Format(Zeit.Minute, "00") & ":" & Format(Zeit.Second, "00")

        ' Parameter
        ' Zeilenzaehlung
        maxLines(0) = 55    ' 10pt
        maxLines(1) = 50    ' 11pt
        maxLines(2) = 46    ' 12pt
        chapLines(0) = 16   ' 10pt
        chapLines(1) = 15   ' 11pt
        chapLines(2) = 14   ' 12pt
        sectLines(0) = 3    ' 10pt
        sectLines(1) = 3    ' 11pt
        sectLines(2) = 3    ' 12pt
        tableLines(0) = 2   ' 10pt
        tableLines(1) = 2   ' 11pt
        tableLines(2) = 2   ' 12pt
        spaceLines(0) = 1   ' 10pt
        spaceLines(1) = 1   ' 11pt
        spaceLines(2) = 1   ' 12pt
        ' Sprache/Titel
        headerLang(1) = "german"
        headerLang(2) = "english"
        titleMain(1) = "Thematischer Wortschatz"
        titleMain(2) = "Thematic Vocabulary"
        ' Sprachen
        If (Lang1 = LangName.Deutsch) Then
            titleText1(1) = "Deutsch"
            titleText1(2) = "German"
        ElseIf (Lang1 = LangName.English) Then
            titleText1(1) = "Englisch"
            titleText1(2) = "English"
        End If
        If (Lang21 = LangName.Deutsch) Then
            titleText21(1) = "Deutsch"
            titleText21(2) = "German"
        ElseIf (Lang21 = LangName.English) Then
            titleText21(1) = "Englisch"
            titleText21(2) = "English"
        ElseIf (Lang21 = LangName.Francais) Then
            titleText21(1) = "Französisch"
            titleText21(2) = "French"
        ElseIf (Lang21 = LangName.Espanol) Then
            titleText21(1) = "Spanisch"
            titleText21(2) = "Spanish"
        ElseIf (Lang21 = LangName.Italiano) Then
            titleText21(1) = "Italienisch"
            titleText21(2) = "Italian"
        ElseIf (Lang21 = LangName.Portoguese) Then
            titleText21(1) = "Portugiesisch"
            titleText21(2) = "Portoguese"
        ElseIf (Lang21 = LangName.Dansk) Then
            titleText21(1) = "Dänisch"
            titleText21(2) = "Danish"
        ElseIf (Lang21 = LangName.Svenska) Then
            titleText21(1) = "Schwedisch"
            titleText21(2) = "Swedish"
        ElseIf (Lang21 = LangName.Ellenika) Then
            titleText21(1) = "Griechisch"
            titleText21(2) = "Greek"
        ElseIf (Lang21 = LangName.Russkij) Then
            titleText21(1) = "Russisch"
            titleText21(2) = "Russian"
        ElseIf (Lang21 = LangName.Polski) Then
            titleText21(1) = "Polnisch"
            titleText21(2) = "Polish"
        ElseIf (Lang21 = LangName.Hrvatski) Then
            titleText21(1) = "Kroatisch"
            titleText21(2) = "Croatian"
        ElseIf (Lang21 = LangName.AnyLang) Then
            titleText21(1) = "X-Sprache"
            titleText21(2) = "X-Language"
        End If
        If (Lang22 = LangName.Deutsch) Then
            titleText22(1) = "Deutsch"
            titleText22(2) = "German"
        ElseIf (Lang22 = LangName.English) Then
            titleText22(1) = "Englisch"
            titleText22(2) = "English"
        ElseIf (Lang22 = LangName.Francais) Then
            titleText22(1) = "Französisch"
            titleText22(2) = "French"
        ElseIf (Lang22 = LangName.Espanol) Then
            titleText22(1) = "Spanisch"
            titleText22(2) = "Spanish"
        ElseIf (Lang22 = LangName.Italiano) Then
            titleText22(1) = "Italienisch"
            titleText22(2) = "Italian"
        ElseIf (Lang22 = LangName.Portoguese) Then
            titleText22(1) = "Portugiesisch"
            titleText22(2) = "Portoguese"
        ElseIf (Lang22 = LangName.Dansk) Then
            titleText22(1) = "Dänisch"
            titleText22(2) = "Danish"
        ElseIf (Lang22 = LangName.Svenska) Then
            titleText22(1) = "Schwedisch"
            titleText22(2) = "Swedish"
        ElseIf (Lang22 = LangName.Ellenika) Then
            titleText22(1) = "Griechisch"
            titleText22(2) = "Greek"
        ElseIf (Lang22 = LangName.Russkij) Then
            titleText22(1) = "Russisch"
            titleText22(2) = "Russian"
        ElseIf (Lang22 = LangName.Polski) Then
            titleText22(1) = "Polnisch"
            titleText22(2) = "Polish"
        ElseIf (Lang22 = LangName.Hrvatski) Then
            titleText22(1) = "Kroatisch"
            titleText22(2) = "Croatian"
        ElseIf (Lang22 = LangName.AnyLang) Then
            titleText22(1) = "X-Sprache"
            titleText22(2) = "X-Language"
        ElseIf (Lang22 = -1) Then
            titleText22(1) = "-----"
            titleText22(2) = "-----"
        End If
        If (Lang21 = LangName.Ellenika) Then
            wordTextEnviro11 = "\foreignlanguage{greek}{"
            wordTextEnviro12 = "}"
        ElseIf (Lang21 = LangName.Russkij) Then
            wordTextEnviro11 = "\foreignlanguage{russian}{"
            wordTextEnviro12 = "}"
        Else
            wordTextEnviro11 = ""
            wordTextEnviro12 = ""
        End If
        If (Lang22 = LangName.Ellenika) Then
            wordTextEnviro21 = "\foreignlanguage{greek}{"
            wordTextEnviro22 = "}"
        ElseIf (Lang22 = LangName.Russkij) Then
            wordTextEnviro21 = "\foreignlanguage{russian}{"
            wordTextEnviro22 = "}"
        Else
            wordTextEnviro21 = ""
            wordTextEnviro22 = ""
        End If
        If (Lang21 = LangName.AnyLang Or Lang22 = LangName.AnyLang) Then
            MsgBox("Please use on your own appropriate LaTeX package for Any-Language! Cyrillic letters need environment \foreignlanguage{russian}{word}.", _
                   MsgBoxStyle.Information, "LaTeX Header: \usepackage")
        End If
        testText(1) = "αβγδεζηθικλμνξοπρςστυφχψωάέήίόύώϊΐΰΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΆΈΉΊΌΎΏΪΫ"    ' Greek and extra
        testText(2) = "абвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"      ' Russian Cyrillic

        ' Open File (UTF8 special characters will be changed later)
        Dim appendMode As Boolean = False   ' This overwrites the entire file.
        Dim sw As New StreamWriter(texFile, appendMode, System.Text.Encoding.UTF8)

        ' LaTeX: File Header
        sw.WriteLine("\documentclass[1" & fontSize & "pt,twoside]{report}")
        sw.WriteLine("% created by Decaleon at " & strDatum & " at " & strZeit)
        sw.WriteLine("% !TeX encoding = UTF-8")
        sw.WriteLine("% compiling with LuaLaTeX or XeLaTeX recommended")
        If (Lang21 = LangName.Ellenika Or Lang22 = LangName.Ellenika) Then
            sw.WriteLine("\usepackage[OT2,T1]{fontenc}")
            sw.WriteLine("\usepackage[greek," & headerLang(titGerEng) & "]{babel}")
            sw.WriteLine("% " & testText(1))
        ElseIf (Lang21 = LangName.Russkij Or Lang22 = LangName.Russkij) Then
            sw.WriteLine("\usepackage[OT2,T1]{fontenc}")
            sw.WriteLine("\usepackage[russian," & headerLang(titGerEng) & "]{babel}")
            sw.WriteLine("% " & testText(2))
        Else
            sw.WriteLine("\usepackage{" & headerLang(titGerEng) & "}")
        End If
        sw.WriteLine("% \usepackage{" & headerLang(titGerEng) & "}")
        sw.WriteLine("% \usepackage[ngerman]{babel}")
        sw.WriteLine("% \usepackage[T1]{fontenc}")
        sw.WriteLine("% \usepackage[latin1]{inputenc}")
        sw.WriteLine("\usepackage{makeidx}")
        sw.WriteLine("\usepackage{tabularx}")
        sw.WriteLine("\usepackage{graphicx}")
        sw.WriteLine("\usepackage{graphics}")
        sw.WriteLine("\usepackage{lscape}")
        sw.WriteLine("\usepackage{pdflscape}")
        sw.WriteLine("")
        sw.WriteLine("% \pagestyle{empty}")
        sw.WriteLine("% \thispagestyle{empty}")
        sw.WriteLine("")
        sw.WriteLine("% Seitenlayout")
        sw.WriteLine("\setlength{\oddsidemargin}{0.00cm}")
        sw.WriteLine("\setlength{\evensidemargin}{-0.80cm}")
        sw.WriteLine("\setlength{\textwidth}{16.0cm}")
        sw.WriteLine("\addtolength{\topmargin}{-2cm}")
        sw.WriteLine("\setlength{\textheight}{24cm}")
        sw.WriteLine("\setlength{\headheight}{0.5cm}")
        sw.WriteLine("\setlength{\headsep}{0.5cm}")
        sw.WriteLine("\setlength{\topskip}{1cm}")
        sw.WriteLine("\setlength{\footskip}{2cm}")
        sw.WriteLine("%\setlength{\footheight}{1cm}")
        sw.WriteLine("")
        sw.WriteLine("% Tabellenspalten (tabularx)")
        sw.WriteLine("\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}")
        sw.WriteLine("\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}")
        sw.WriteLine("\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}")
        sw.WriteLine("")
        sw.WriteLine("% Absatzabstand")
        sw.WriteLine("\setlength{\parskip}{1ex plus0.5ex minus0.2ex}")
        sw.WriteLine("")
        sw.WriteLine("% Numerierung")
        sw.WriteLine("\setcounter{secnumdepth}{4}")
        sw.WriteLine("")
        sw.WriteLine("\title{" & titleMain(titGerEng) & " Niveaus A-C \\")
        sw.WriteLine("       " & titleText1(titGerEng) & " - " & titleText21(titGerEng) & " - " & titleText22(titGerEng) & "\\")
        sw.WriteLine("       generated with Decaleon 6.0}")
        sw.WriteLine("\author{Markus Penzkofer}")
        sw.WriteLine("\date{Version 1.0 \\")
        sw.WriteLine("      Mai 2017}")
        sw.WriteLine("")
        sw.WriteLine("")
        sw.WriteLine("% Seitenindex")
        sw.WriteLine("\makeindex")
        sw.WriteLine("")
        sw.WriteLine("")
        sw.WriteLine("\begin{document}")
        sw.WriteLine("")
        sw.WriteLine("\maketitle")
        sw.WriteLine("")
        sw.WriteLine("")
        sw.WriteLine("% Inhaltsverzeichnis")
        sw.WriteLine("\newpage")
        sw.WriteLine("")
        sw.WriteLine("\quad")
        sw.WriteLine("")
        sw.WriteLine("\thispagestyle{empty}")
        sw.WriteLine("")
        sw.WriteLine("\newpage")
        sw.WriteLine("")
        sw.WriteLine("\setcounter{page}{1}")
        sw.WriteLine("% S.1")
        sw.WriteLine("\tableofcontents")
        sw.WriteLine("")
        sw.WriteLine("")
        sw.WriteLine("%\null")
        sw.WriteLine("\newpage")
        sw.WriteLine("")

        ' Init
        countTables(0) = 0
        countWords(0) = 0
        sumLines = 0

        For t = 1 To 142    ' 24Themen+118Subthemen (153    ' 26Themen+127Subthemen)
            ' Subthema -> Unterkapitel erzeugen
            If (pubVocSubThemes(t, 1).StartsWith("-") = True) Then
                newChapter = True
                sumLines = chapLines(fontSize)
                sw.WriteLine("")
                sw.WriteLine("\chapter{" & pubVocSubThemes(t, titGerEng + 1) & "}")
                sw.WriteLine("")
            Else
                newSection = True
                If (newChapter = True) Then
                    sumLines = sumLines + sectLines(fontSize)
                Else
                    sumLines = sectLines(fontSize)
                End If
                newChapter = False
                sw.WriteLine("")
                sw.WriteLine("\section{" & pubVocSubThemes(t, titGerEng + 1) & "}")
                sw.WriteLine("")
            End If
            For g = 1 To 2875   ' 725+900+500+750 Gruppen (G/A+B+C+E)
                currMembs = pubVocabularyGrp(g)._GrpMember(0)
                ' Check for empty tables
                currLines = 0
                For w = 1 To currMembs
                    wordIndex = pubVocabularyGrp(g)._GrpMember(w).Substring(3)      ' Index
                    wordType = pubVocabularyGrp(g)._GrpMember(w).Substring(0, 3)    ' Wortart
                    wordText21 = getWord2(Lang21, wordType, wordIndex)
                    If (Lang22 <> -1) Then
                        wordText22 = getWord2(Lang22, wordType, wordIndex)
                    Else
                        wordText22 = "-----"
                    End If
                    If (wordText21 <> "***" And wordText21 <> "###" And wordText21 <> "" And _
                        wordText22 <> "***" And wordText22 <> "###" And wordText22 <> "") Then
                        currLines = currLines + 1
                    End If
                Next
                If (pubVocabularyGrp(g)._GrpAllTheme = pubVocSubThemes(t, 1) And currLines >= val) Then
                    ' Gruppe -> Referenz und Name erzeugen
                    countTables(0) = countTables(0) + 1
                    indexText(1) = pubVocabularyGrp(g)._GrpAllName(titGerEng)
                    indexText(1) = Replace(indexText(1), "ä", "a").Replace("ö", "o").Replace("ü", "u").Replace("ß", "s")
                    indexText(1) = Replace(indexText(1), "Ä", "A").Replace("Ö", "O").Replace("Ü", "U")
                    indexText(2) = pubVocabularyGrp(g)._GrpAllName(titGerEng)
                    indexText(2) = Replace(indexText(2), "ä", "\" & da & "a").Replace("ö", "\" & da & "o").Replace("ü", "\" & da & "u").Replace("ß", "\ss{}")
                    indexText(2) = Replace(indexText(2), "Ä", "\" & da & "A").Replace("Ö", "\" & da & "O").Replace("Ü", "\" & da & "U")
                    ' vor naechster Tabelle
                    If (sumLines + currLines + 3 < maxLines(fontSize)) Then
                        ' naechste Tabelle mit Zwischenraum
                        sumLines = sumLines + currLines + spaceLines(fontSize)
                        sw.WriteLine("")
                        sw.WriteLine("\vspace{0.5cm}")
                        sw.WriteLine("")
                    Else
                        ' naechste Tabelle auf neuer Seite
                        sumLines = currLines + spaceLines(fontSize)
                        If (newSection = False) Then
                            sw.WriteLine("")
                            sw.WriteLine("\newpage")
                            sw.WriteLine("")
                            'sw.WriteLine("\quad")
                            'sw.WriteLine("")
                        End If
                    End If
                    newSpace = ""
                    If (newSection = True) Then newSpace = "\hspace{0.4cm}"
                    sw.WriteLine("")
                    sw.WriteLine(newSpace & " " & pubVocabularyGrp(g)._GrpAllName(titGerEng))
                    sw.WriteLine("")
                    sw.WriteLine("\index{" & indexText(1) & "@" & indexText(2) & "}")
                    sw.WriteLine("")
                    newSection = False
                    ' Gruppe -> Tabellenkopf erzeugen
                    sumLines = sumLines + tableLines(fontSize)
                    If (Lang22 <> -1) Then
                        sw.WriteLine("\begin{tabular}{|L{5cm}|L{5cm}|L{5cm}|} \hline")
                        sw.WriteLine(titleText1(titGerEng) & " " & amp & " " & titleText21(titGerEng) & " " & amp & " " & titleText22(titGerEng) & " \\ \hline")
                    Else
                        sw.WriteLine("\begin{tabular}{|L{7.5cm}|L{7.5cm}|} \hline")
                        sw.WriteLine(titleText1(titGerEng) & " " & amp & " " & titleText21(titGerEng) & " \\ \hline")
                    End If
                    ' Woerter eintragen
                    For w = 1 To currMembs
                        wordIndex = pubVocabularyGrp(g)._GrpMember(w).Substring(3)      ' Index
                        wordType = pubVocabularyGrp(g)._GrpMember(w).Substring(0, 3)    ' Wortart
                        ' Sprache 1: Deutsch, Englisch
                        wordText1 = ""
                        If (Lang1 = LangName.Deutsch) Then
                            If (wordType = "Nom") Then
                                wordText1 = pubVocabularyNom(wordIndex)._GerNomen
                            ElseIf (wordType = "Ver") Then
                                wordText1 = pubVocabularyVer(wordIndex)._GerVerb
                            ElseIf (wordType = "Adj") Then
                                wordText1 = pubVocabularyAdj(wordIndex)._GerAdjective
                            End If
                        ElseIf (Lang1 = LangName.English) Then
                            If (wordType = "Nom") Then
                                wordText1 = pubVocabularyNom(wordIndex)._EngNomen
                            ElseIf (wordType = "Ver") Then
                                wordText1 = pubVocabularyVer(wordIndex)._EngVerb
                            ElseIf (wordType = "Adj") Then
                                wordText1 = pubVocabularyAdj(wordIndex)._EngAdjective
                            End If
                        End If
                        ' Sprache 21: Deutsch, Englisch, Französisch, Spanisch, Italienisch, Portogiesisch, Dänisch, Schwedisch, Griechisch, Russisch, Polnisch, Kroatisch
                        wordText21 = getWord2(Lang21, wordType, wordIndex)
                        ' Sprache 22: Deutsch, Englisch, Französisch, Spanisch, Italienisch, Portogiesisch, Dänisch, Schwedisch, Griechisch, Russisch, Polnisch, Kroatisch
                        If (Lang22 <> -1) Then
                            wordText22 = getWord2(Lang22, wordType, wordIndex)
                        Else
                            wordText22 = "-----"
                        End If
                        ' Tabellenzeile: Wort schreiben
                        If (wordText1 <> "***" And wordText1 <> "###" And wordText1 <> "" And _
                            wordText21 <> "***" And wordText21 <> "###" And wordText21 <> "" And _
                            wordText22 <> "***" And wordText22 <> "###" And wordText22 <> "") Then
                            wordText1 = wordText1.Replace("§", "\§").Replace("$", "\$").Replace("%", "\%").Replace("&", "\&").Replace("#", "\#")
                            wordText21 = wordText21.Replace("§", "\§").Replace("$", "\$").Replace("%", "\%").Replace("&", "\&").Replace("#", "\#")
                            wordText22 = wordText22.Replace("§", "\§").Replace("$", "\$").Replace("%", "\%").Replace("&", "\&").Replace("#", "\#")
                            countWords(0) = countWords(0) + 1
                            If (Lang22 <> -1) Then
                                sw.WriteLine(wordText1 & " " & amp & " " & wordTextEnviro11 & wordText21 & wordTextEnviro12 & " " & amp & " " & wordTextEnviro21 & wordText22 & wordTextEnviro22 & " \\")
                            Else
                                sw.WriteLine(wordText1 & " " & amp & " " & wordTextEnviro11 & wordText21 & wordTextEnviro12 & " \\")
                            End If
                        End If

                    Next
                    ' Gruppe -> Tabellenende erzeugen
                    sw.WriteLine("\hline")
                    sw.WriteLine("\end{tabular}")

                End If

            Next

            ' vor naechstem Unterkapitel
            If (newChapter = False) Then
                sw.WriteLine("")
                sw.WriteLine("\newpage")
                sw.WriteLine("")
                'sw.WriteLine("\quad")
                'sw.WriteLine("")
            End If

        Next

        ' LaTeX: Index
        sw.WriteLine("")
        sw.WriteLine("\newpage")
        sw.WriteLine("")
        sw.WriteLine("\section*{Seitenindex}")
        sw.WriteLine("\addcontentsline{toc}{section}{Seitenindex}")
        sw.WriteLine("")
        sw.WriteLine("\subsection*{Stichwortverzeichnis}")
        sw.WriteLine("")
        sw.WriteLine("\printindex")
        sw.WriteLine("% geht mit TeXstudio nicht - mit TeXnicCenter erzeugen!!!")
        sw.WriteLine("")
        sw.WriteLine("\newpage")
        sw.WriteLine("")
        sw.WriteLine("\quad")
        sw.WriteLine("")

        ' LaTeX: File End
        sw.WriteLine("")
        sw.WriteLine("\end{document}")
        sw.WriteLine("")

        ' Close File
        sw.Close()

        ' Nachbearbeitung
        replaceSpecChars(texFile, texFile)

        ' return Value
        retVal._Tables = countTables
        retVal._Words = countWords
        exportGroupsBySubthemes = retVal

    End Function

    Public Function exportGroupsBySubthemesTwoParts(texFile As String, fontSize As Integer, titGerEng As Integer, Lang1 As Integer, Lang21 As Integer, Lang22 As Integer, val As Integer) As ThemBook
        ' Export Thematic Groups sorted by Subthemes, divided in two parts (LaTeX)
        ' not for Esperanto
        ' - texFile: Name der LaTeX-Datei
        ' - fontSize: 0 = 10pt, 1 = 11pt, 2 = 12pt
        ' - titGerEng: 1 = Ger, 2 = Eng
        ' - Lang1: From Language (Deutsch, Englisch)
        ' - Lang21: 1st To Language (1-12)
        ' - Lang22: 2nd To Language (1-12), -1 = inaktiv
        ' - val: minimum words per table: 1
        Dim retVal As ThemBook
        Dim Datum As Date
        Dim Zeit As Date
        Dim sw(3) As StreamWriter
        Dim texFileName As String
        Dim texFiles(3) As String
        Dim headerLang(2) As String
        Dim titleMain(2) As String
        Dim titleNiv(2, 3) As String
        Dim titleNiv12 As String
        Dim switchNiv As Integer
        Dim wordIndex As Long
        Dim wordType As String
        Dim wordText1 As String
        Dim wordText21 As String
        Dim wordText22 As String
        Dim wordTextEnviro11, wordTextEnviro12 As String
        Dim wordTextEnviro21, wordTextEnviro22 As String
        Dim titleText1(2) As String
        Dim titleText21(2) As String
        Dim titleText22(2) As String
        Dim indexText(2) As String
        Dim newSpace As String
        Dim currMembs As Integer
        Dim currLines(3) As Integer
        Dim sumLines(3) As Integer
        Dim maxLines(2) As Integer
        Dim chapLines(2) As Integer
        Dim sectLines(2) As Integer
        Dim tableLines(2) As Integer
        Dim spaceLines(2) As Integer
        Dim newChapter As Boolean
        Dim newSection As Boolean
        Dim countTables(3) As Integer
        Dim countWords(3) As Long
        Dim strDatum As String
        Dim strZeit As String
        Dim g, t, w As Integer
        Dim i As Integer
        Dim da = Convert.ToChar(&H22)   ' Doppelte Anfuehrungszeichen
        Dim amp = Convert.ToChar(&H26)  ' Kaufmaennisches Und

        ' aktuelles Datum
        Datum = System.DateTime.Today.Date
        strDatum = Datum.Day & "." & Datum.Month & "." & Datum.Year

        ' aktuelle Uhrzeit
        Zeit = Now()
        strZeit = Format(Zeit.Hour, "00") & ":" & Format(Zeit.Minute, "00") & ":" & Format(Zeit.Second, "00")

        ' Parameter
        ' Zeilenzaehlung
        maxLines(0) = 55    ' 10pt
        maxLines(1) = 50    ' 11pt
        maxLines(2) = 46    ' 12pt
        chapLines(0) = 16   ' 10pt
        chapLines(1) = 15   ' 11pt
        chapLines(2) = 14   ' 12pt
        sectLines(0) = 3    ' 10pt
        sectLines(1) = 3    ' 11pt
        sectLines(2) = 3    ' 12pt
        tableLines(0) = 2   ' 10pt
        tableLines(1) = 2   ' 11pt
        tableLines(2) = 2   ' 12pt
        spaceLines(0) = 1   ' 10pt
        spaceLines(1) = 1   ' 11pt
        spaceLines(2) = 1   ' 12pt
        ' Sprache/Titel
        texFileName = texFile.Substring(0, texFile.IndexOf(".tex"))
        texFiles(1) = texFileName & "1" & ".tex"
        texFiles(2) = texFileName & "2" & ".tex"
        texFiles(3) = texFileName & "3" & ".tex"
        headerLang(1) = "german"
        headerLang(2) = "english"
        titleMain(1) = "Thematischer Wortschatz"
        titleMain(2) = "Thematic Vocabulary"
        titleNiv(1, 1) = "Niveaus A1/A2/B1"
        titleNiv(1, 2) = "Niveaus B2/C1/C2"
        titleNiv(1, 3) = "Fachwörter"
        titleNiv(2, 1) = "Niveaus A1/A2/B1"
        titleNiv(2, 2) = "Niveaus B2/C1/C2"
        titleNiv(2, 3) = "Technical Terms"
        ' Sprachen
        If (Lang1 = LangName.Deutsch) Then
            titleText1(1) = "Deutsch"
            titleText1(2) = "German"
        ElseIf (Lang1 = LangName.English) Then
            titleText1(1) = "Englisch"
            titleText1(2) = "English"
        End If
        If (Lang21 = LangName.Deutsch) Then
            titleText21(1) = "Deutsch"
            titleText21(2) = "German"
        ElseIf (Lang21 = LangName.English) Then
            titleText21(1) = "Englisch"
            titleText21(2) = "English"
        ElseIf (Lang21 = LangName.Francais) Then
            titleText21(1) = "Französisch"
            titleText21(2) = "French"
        ElseIf (Lang21 = LangName.Espanol) Then
            titleText21(1) = "Spanisch"
            titleText21(2) = "Spanish"
        ElseIf (Lang21 = LangName.Italiano) Then
            titleText21(1) = "Italienisch"
            titleText21(2) = "Italian"
        ElseIf (Lang21 = LangName.Portoguese) Then
            titleText21(1) = "Portugiesisch"
            titleText21(2) = "Portoguese"
        ElseIf (Lang21 = LangName.Dansk) Then
            titleText21(1) = "Dänisch"
            titleText21(2) = "Danish"
        ElseIf (Lang21 = LangName.Svenska) Then
            titleText21(1) = "Schwedisch"
            titleText21(2) = "Swedish"
        ElseIf (Lang21 = LangName.Ellenika) Then
            titleText21(1) = "Griechisch"
            titleText21(2) = "Greek"
        ElseIf (Lang21 = LangName.Russkij) Then
            titleText21(1) = "Russisch"
            titleText21(2) = "Russian"
        ElseIf (Lang21 = LangName.Polski) Then
            titleText21(1) = "Polnisch"
            titleText21(2) = "Polish"
        ElseIf (Lang21 = LangName.Hrvatski) Then
            titleText21(1) = "Kroatisch"
            titleText21(2) = "Croatian"
        ElseIf (Lang21 = LangName.AnyLang) Then
            titleText21(1) = "X-Sprache"
            titleText21(2) = "X-Language"
        End If
        If (Lang22 = LangName.Deutsch) Then
            titleText22(1) = "Deutsch"
            titleText22(2) = "German"
        ElseIf (Lang22 = LangName.English) Then
            titleText22(1) = "Englisch"
            titleText22(2) = "English"
        ElseIf (Lang22 = LangName.Francais) Then
            titleText22(1) = "Französisch"
            titleText22(2) = "French"
        ElseIf (Lang22 = LangName.Espanol) Then
            titleText22(1) = "Spanisch"
            titleText22(2) = "Spanish"
        ElseIf (Lang22 = LangName.Italiano) Then
            titleText22(1) = "Italienisch"
            titleText22(2) = "Italian"
        ElseIf (Lang22 = LangName.Portoguese) Then
            titleText22(1) = "Portugiesisch"
            titleText22(2) = "Portoguese"
        ElseIf (Lang22 = LangName.Dansk) Then
            titleText22(1) = "Dänisch"
            titleText22(2) = "Danish"
        ElseIf (Lang22 = LangName.Svenska) Then
            titleText22(1) = "Schwedisch"
            titleText22(2) = "Swedish"
        ElseIf (Lang22 = LangName.Polski) Then
            titleText22(1) = "Polnisch"
            titleText22(2) = "Polish"
        ElseIf (Lang22 = LangName.Ellenika) Then
            titleText22(1) = "Griechisch"
            titleText22(2) = "Greek"
        ElseIf (Lang22 = LangName.Russkij) Then
            titleText22(1) = "Russisch"
            titleText22(2) = "Russian"
        ElseIf (Lang22 = LangName.Hrvatski) Then
            titleText22(1) = "Kroatisch"
            titleText22(2) = "Croatian"
        ElseIf (Lang22 = LangName.AnyLang) Then
            titleText22(1) = "X-Sprache"
            titleText22(2) = "X-Language"
        ElseIf (Lang22 = -1) Then
            titleText22(1) = "-----"
            titleText22(2) = "-----"
        End If
        If (Lang21 = LangName.Ellenika) Then
            wordTextEnviro11 = "\foreignlanguage{greek}{"
            wordTextEnviro12 = "}"
        ElseIf (Lang21 = LangName.Russkij) Then
            wordTextEnviro11 = "\foreignlanguage{russian}{"
            wordTextEnviro12 = "}"
        Else
            wordTextEnviro11 = ""
            wordTextEnviro12 = ""
        End If
        If (Lang22 = LangName.Ellenika) Then
            wordTextEnviro21 = "\foreignlanguage{greek}{"
            wordTextEnviro22 = "}"
        ElseIf (Lang22 = LangName.Russkij) Then
            wordTextEnviro21 = "\foreignlanguage{russian}{"
            wordTextEnviro22 = "}"
        Else
            wordTextEnviro21 = ""
            wordTextEnviro22 = ""
        End If
        If (Lang21 = LangName.AnyLang Or Lang22 = LangName.AnyLang) Then
            MsgBox("Please use on your own appropriate LaTeX package for Any-Language! Cyrillic letters need environment \foreignlanguage{russian}{word}.", _
                   MsgBoxStyle.Information, "LaTeX Header: \usepackage")
        End If

        ' Open File (UTF8 special characters will be changed later)
        Dim appendMode As Boolean = False   ' This overwrites the entire file.
        Dim sw1 As New StreamWriter(texFiles(1), appendMode, System.Text.Encoding.UTF8)
        Dim sw2 As New StreamWriter(texFiles(2), appendMode, System.Text.Encoding.UTF8)
        Dim sw3 As New StreamWriter(texFiles(3), appendMode, System.Text.Encoding.UTF8)
        sw(1) = sw1
        sw(2) = sw2
        sw(3) = sw3

        ' LaTeX: File Header
        For i = 1 To 3
            titleNiv12 = "Niveau"
            If (i = 1) Then
                titleNiv12 = titleNiv(titGerEng, 1)
            ElseIf (i = 2) Then
                titleNiv12 = titleNiv(titGerEng, 2)
            ElseIf (i = 3) Then
                titleNiv12 = titleNiv(titGerEng, 3)
            End If
            sw(i).WriteLine("\documentclass[1" & fontSize & "pt,twoside]{report}")
            sw(i).WriteLine("% created by Decaleon at " & strDatum & " at " & strZeit)
            sw(i).WriteLine("% !TeX encoding = UTF-8")
            sw(i).WriteLine("% compiling with LuaLaTeX or XeLaTeX recommended")
            If (Lang21 = LangName.Ellenika Or Lang22 = LangName.Ellenika) Then
                sw(i).WriteLine("\usepackage[OT2,T1]{fontenc}")
                sw(i).WriteLine("\usepackage[greek," & headerLang(titGerEng) & "]{babel}")
            ElseIf (Lang21 = LangName.Russkij Or Lang22 = LangName.Russkij) Then
                sw(i).WriteLine("\usepackage[OT2,T1]{fontenc}")
                sw(i).WriteLine("\usepackage[russian," & headerLang(titGerEng) & "]{babel}")
            Else
                sw(i).WriteLine("\usepackage{" & headerLang(titGerEng) & "}")
            End If
            sw(i).WriteLine("% \usepackage{" & headerLang(titGerEng) & "}")
            sw(i).WriteLine("% \usepackage[ngerman]{babel}")
            sw(i).WriteLine("% \usepackage[T1]{fontenc}")
            sw(i).WriteLine("% \usepackage[latin1]{inputenc}")
            sw(i).WriteLine("\usepackage{makeidx}")
            sw(i).WriteLine("\usepackage{tabularx}")
            sw(i).WriteLine("\usepackage{graphicx}")
            sw(i).WriteLine("\usepackage{graphics}")
            sw(i).WriteLine("\usepackage{lscape}")
            sw(i).WriteLine("\usepackage{pdflscape}")
            sw(i).WriteLine("")
            sw(i).WriteLine("% \pagestyle{empty}")
            sw(i).WriteLine("% \thispagestyle{empty}")
            sw(i).WriteLine("")
            sw(i).WriteLine("% Seitenlayout")
            sw(i).WriteLine("\setlength{\oddsidemargin}{0.00cm}")
            sw(i).WriteLine("\setlength{\evensidemargin}{-0.80cm}")
            sw(i).WriteLine("\setlength{\textwidth}{16.0cm}")
            sw(i).WriteLine("\addtolength{\topmargin}{-2cm}")
            sw(i).WriteLine("\setlength{\textheight}{24cm}")
            sw(i).WriteLine("\setlength{\headheight}{0.5cm}")
            sw(i).WriteLine("\setlength{\headsep}{0.5cm}")
            sw(i).WriteLine("\setlength{\topskip}{1cm}")
            sw(i).WriteLine("\setlength{\footskip}{2cm}")
            sw(i).WriteLine("%\setlength{\footheight}{1cm}")
            sw(i).WriteLine("")
            sw(i).WriteLine("% Tabellenspalten (tabularx)")
            sw(i).WriteLine("\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}")
            sw(i).WriteLine("\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}")
            sw(i).WriteLine("\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}")
            sw(i).WriteLine("")
            sw(i).WriteLine("% Absatzabstand")
            sw(i).WriteLine("\setlength{\parskip}{1ex plus0.5ex minus0.2ex}")
            sw(i).WriteLine("")
            sw(i).WriteLine("% Numerierung")
            sw(i).WriteLine("\setcounter{secnumdepth}{4}")
            sw(i).WriteLine("")
            sw(i).WriteLine("\title{" & titleMain(titGerEng) & " " & titleNiv12 & " \\")
            sw(i).WriteLine("       " & titleText1(titGerEng) & " - " & titleText21(titGerEng) & " - " & titleText22(titGerEng) & "\\")
            sw(i).WriteLine("       generated with Decaleon 6.0}")
            sw(i).WriteLine("\author{Markus Penzkofer}")
            sw(i).WriteLine("\date{Version 1.0 \\")
            sw(i).WriteLine("      Mai 2017}")
            sw(i).WriteLine("")
            sw(i).WriteLine("")
            sw(i).WriteLine("% Seitenindex")
            sw(i).WriteLine("\makeindex")
            sw(i).WriteLine("")
            sw(i).WriteLine("")
            sw(i).WriteLine("\begin{document}")
            sw(i).WriteLine("")
            sw(i).WriteLine("\maketitle")
            sw(i).WriteLine("")
            sw(i).WriteLine("")
            sw(i).WriteLine("% Inhaltsverzeichnis")
            sw(i).WriteLine("\newpage")
            sw(i).WriteLine("")
            sw(i).WriteLine("\quad")
            sw(i).WriteLine("")
            sw(i).WriteLine("\thispagestyle{empty}")
            sw(i).WriteLine("")
            sw(i).WriteLine("\newpage")
            sw(i).WriteLine("")
            sw(i).WriteLine("\setcounter{page}{1}")
            sw(i).WriteLine("% S.1")
            sw(i).WriteLine("\tableofcontents")
            sw(i).WriteLine("")
            sw(i).WriteLine("")
            sw(i).WriteLine("%\null")
            sw(i).WriteLine("\newpage")
            sw(i).WriteLine("")
        Next

        ' Init
        countTables(0) = 0
        countTables(1) = 0
        countTables(2) = 0
        countTables(3) = 0
        countWords(0) = 0
        countWords(1) = 0
        countWords(2) = 0
        countWords(3) = 0
        sumLines(1) = 0
        sumLines(2) = 0
        sumLines(3) = 0

        For t = 1 To 142    ' 24Themen+118Subthemen (153    ' 26Themen+127Subthemen)
            ' Subthema -> Unterkapitel erzeugen
            If (pubVocSubThemes(t, 1).StartsWith("-") = True) Then
                newChapter = True
                For i = 1 To 3
                    sumLines(i) = chapLines(fontSize)
                    sw(i).WriteLine("")
                    sw(i).WriteLine("\chapter{" & pubVocSubThemes(t, titGerEng + 1) & "}")
                    sw(i).WriteLine("")
                Next
            Else
                newSection = True
                For i = 1 To 3
                    If (newChapter = True) Then
                        sumLines(i) = sumLines(i) + sectLines(fontSize)
                    Else
                        sumLines(i) = sectLines(fontSize)
                    End If
                    sw(i).WriteLine("")
                    sw(i).WriteLine("\section{" & pubVocSubThemes(t, titGerEng + 1) & "}")
                    sw(i).WriteLine("")
                Next
                newChapter = False
            End If
            For g = 1 To 2875   ' 725+900+500+750 Gruppen (G/A+B+C+E)
                currMembs = pubVocabularyGrp(g)._GrpMember(0)
                If (pubVocabularyGrp(g)._GrpNumber.StartsWith("F") = True) Then
                    ' Niveaus A/B
                    switchNiv = 1
                ElseIf (pubVocabularyGrp(g)._GrpNumber.StartsWith("G") = True Or pubVocabularyGrp(g)._GrpNumber.StartsWith("D") = True) Then
                    ' Niveaus B/C
                    switchNiv = 2
                ElseIf (pubVocabularyGrp(g)._GrpNumber.StartsWith("EF") = True) Then
                    ' Fachwörter
                    switchNiv = 3
                End If
                ' Check for empty tables
                currLines(switchNiv) = 0
                For w = 1 To currMembs
                    wordIndex = pubVocabularyGrp(g)._GrpMember(w).Substring(3)      ' Index
                    wordType = pubVocabularyGrp(g)._GrpMember(w).Substring(0, 3)    ' Wortart
                    wordText21 = getWord2(Lang21, wordType, wordIndex)
                    If (Lang22 <> -1) Then
                        wordText22 = getWord2(Lang22, wordType, wordIndex)
                    Else
                        wordText22 = "-----"
                    End If
                    If (wordText21 <> "***" And wordText21 <> "###" And wordText21 <> "" And _
                        wordText22 <> "***" And wordText22 <> "###" And wordText22 <> "") Then
                        currLines(switchNiv) = currLines(switchNiv) + 1
                    End If
                Next
                If (pubVocabularyGrp(g)._GrpAllTheme = pubVocSubThemes(t, 1) And currLines(switchNiv) >= val) Then
                    ' Gruppe -> Referenz und Name erzeugen
                    countTables(0) = countTables(0) + 1
                    countTables(switchNiv) = countTables(switchNiv) + 1
                    indexText(1) = pubVocabularyGrp(g)._GrpAllName(titGerEng)
                    indexText(1) = Replace(indexText(1), "ä", "a").Replace("ö", "o").Replace("ü", "u").Replace("ß", "s")
                    indexText(1) = Replace(indexText(1), "Ä", "A").Replace("Ö", "O").Replace("Ü", "U")
                    indexText(2) = pubVocabularyGrp(g)._GrpAllName(titGerEng)
                    indexText(2) = Replace(indexText(2), "ä", "\" & da & "a").Replace("ö", "\" & da & "o").Replace("ü", "\" & da & "u").Replace("ß", "\ss{}")
                    indexText(2) = Replace(indexText(2), "Ä", "\" & da & "A").Replace("Ö", "\" & da & "O").Replace("Ü", "\" & da & "U")
                    ' vor naechster Tabelle
                    If (sumLines(switchNiv) + currLines(switchNiv) + 3 < maxLines(fontSize)) Then
                        ' naechste Tabelle mit Zwischenraum
                        sumLines(switchNiv) = sumLines(switchNiv) + currLines(switchNiv) + spaceLines(fontSize)
                        sw(switchNiv).WriteLine("")
                        sw(switchNiv).WriteLine("\vspace{0.5cm}")
                        sw(switchNiv).WriteLine("")
                    Else
                        ' naechste Tabelle auf neuer Seite
                        sumLines(switchNiv) = currLines(switchNiv) + spaceLines(fontSize)
                        If (newSection = False) Then
                            sw(switchNiv).WriteLine("")
                            sw(switchNiv).WriteLine("\newpage")
                            sw(switchNiv).WriteLine("")
                            'sw.WriteLine("\quad")
                            'sw.WriteLine("")
                        End If
                    End If
                    newSpace = ""
                    If (newSection = True) Then newSpace = "\hspace{0.4cm}"
                    sw(switchNiv).WriteLine("")
                    sw(switchNiv).WriteLine(newSpace & " " & pubVocabularyGrp(g)._GrpAllName(titGerEng))
                    sw(switchNiv).WriteLine("")
                    sw(switchNiv).WriteLine("\index{" & indexText(1) & "@" & indexText(2) & "}")
                    sw(switchNiv).WriteLine("")
                    newSection = False
                    ' Gruppe -> Tabellenkopf erzeugen
                    sumLines(switchNiv) = sumLines(switchNiv) + tableLines(fontSize)
                    If (Lang22 <> -1) Then
                        sw(switchNiv).WriteLine("\begin{tabular}{|L{5cm}|L{5cm}|L{5cm}|} \hline")
                        sw(switchNiv).WriteLine(titleText1(titGerEng) & " " & amp & " " & titleText21(titGerEng) & " " & amp & " " & titleText22(titGerEng) & " \\ \hline")
                    Else
                        sw(switchNiv).WriteLine("\begin{tabular}{|L{7.5cm}|L{7.5cm}|} \hline")
                        sw(switchNiv).WriteLine(titleText1(titGerEng) & " " & amp & " " & titleText21(titGerEng) & " \\ \hline")
                    End If
                    ' Woerter eintragen
                    For w = 1 To currMembs
                        wordIndex = pubVocabularyGrp(g)._GrpMember(w).Substring(3)      ' Index
                        wordType = pubVocabularyGrp(g)._GrpMember(w).Substring(0, 3)    ' Wortart
                        ' Sprache 1: Deutsch, Englisch
                        wordText1 = ""
                        If (Lang1 = LangName.Deutsch) Then
                            If (wordType = "Nom") Then
                                wordText1 = pubVocabularyNom(wordIndex)._GerNomen
                            ElseIf (wordType = "Ver") Then
                                wordText1 = pubVocabularyVer(wordIndex)._GerVerb
                            ElseIf (wordType = "Adj") Then
                                wordText1 = pubVocabularyAdj(wordIndex)._GerAdjective
                            End If
                        ElseIf (Lang1 = LangName.English) Then
                            If (wordType = "Nom") Then
                                wordText1 = pubVocabularyNom(wordIndex)._EngNomen
                            ElseIf (wordType = "Ver") Then
                                wordText1 = pubVocabularyVer(wordIndex)._EngVerb
                            ElseIf (wordType = "Adj") Then
                                wordText1 = pubVocabularyAdj(wordIndex)._EngAdjective
                            End If
                        End If
                        ' Sprache 21: Deutsch, Englisch, Französisch, Spanisch, Italienisch, Portogiesisch, Dänisch, Schwedisch, Griechisch, Russisch, Polnisch, Kroatisch
                        wordText21 = getWord2(Lang21, wordType, wordIndex)
                        ' Sprache 22: Deutsch, Englisch, Französisch, Spanisch, Italienisch, Portogiesisch, Dänisch, Schwedisch, Griechisch, Russisch, Polnisch, Kroatisch
                        If (Lang22 <> -1) Then
                            wordText22 = getWord2(Lang22, wordType, wordIndex)
                        Else
                            wordText22 = "-----"
                        End If
                        ' Tabellenzeile: Wort schreiben
                        If (wordText1 <> "***" And wordText1 <> "###" And wordText1 <> "" And _
                            wordText21 <> "***" And wordText21 <> "###" And wordText21 <> "" And _
                            wordText22 <> "***" And wordText22 <> "###" And wordText22 <> "") Then
                            wordText1 = wordText1.Replace("§", "\§").Replace("$", "\$").Replace("%", "\%").Replace("&", "\&").Replace("#", "\#")
                            wordText21 = wordText21.Replace("§", "\§").Replace("$", "\$").Replace("%", "\%").Replace("&", "\&").Replace("#", "\#")
                            wordText22 = wordText22.Replace("§", "\§").Replace("$", "\$").Replace("%", "\%").Replace("&", "\&").Replace("#", "\#")
                            countWords(0) = countWords(0) + 1
                            countWords(switchNiv) = countWords(switchNiv) + 1
                            If (Lang22 <> -1) Then
                                sw(switchNiv).WriteLine(wordText1 & " " & amp & " " & wordTextEnviro11 & wordText21 & wordTextEnviro12 & " " & amp & " " & wordTextEnviro21 & wordText22 & wordTextEnviro22 & " \\")
                            Else
                                sw(switchNiv).WriteLine(wordText1 & " " & amp & " " & wordTextEnviro11 & wordText21 & wordTextEnviro12 & " \\")
                            End If
                        End If

                    Next
                    ' Gruppe -> Tabellenende erzeugen
                    sw(switchNiv).WriteLine("\hline")
                    sw(switchNiv).WriteLine("\end{tabular}")

                End If

            Next

            ' vor naechstem Unterkapitel
            If (newChapter = False) Then
                For i = 1 To 3
                    sw(i).WriteLine("")
                    sw(i).WriteLine("\newpage")
                    sw(i).WriteLine("")
                    'sw(i).WriteLine("\quad")
                    'sw(i).WriteLine("")
                Next
            End If

        Next

        ' LaTeX: Index
        For i = 1 To 3
            sw(i).WriteLine("")
            sw(i).WriteLine("\newpage")
            sw(i).WriteLine("")
            sw(i).WriteLine("\section*{Seitenindex}")
            sw(i).WriteLine("\addcontentsline{toc}{section}{Seitenindex}")
            sw(i).WriteLine("")
            sw(i).WriteLine("\subsection*{Stichwortverzeichnis}")
            sw(i).WriteLine("")
            sw(i).WriteLine("\printindex")
            sw(i).WriteLine("% geht mit TeXstudio nicht - mit TeXnicCenter erzeugen!!!")
            sw(i).WriteLine("")
            sw(i).WriteLine("\newpage")
            sw(i).WriteLine("")
            sw(i).WriteLine("\quad")
            sw(i).WriteLine("")

            ' LaTeX: File End
            sw(i).WriteLine("")
            sw(i).WriteLine("\end{document}")
            sw(i).WriteLine("")

            ' Close File
            sw(i).Close()
        Next

        ' Nachbearbeitung
        For i = 1 To 3
            replaceSpecChars(texFiles(i), texFiles(i))
        Next


        ' return Value
        retVal._Tables = countTables
        retVal._Words = countWords
        exportGroupsBySubthemesTwoParts = retVal

    End Function

    Private Function getWord2(Lang2 As Integer, wordType As String, wordIndex As Long) As String
        ' Sprache 2: Deutsch, Englisch, Französisch, Spanisch, Italienisch, Portogiesisch, Dänisch, Schwedisch, Griechisch, Russisch, Polnisch, Kroatisch
        Dim wordText2 As String

        wordText2 = ""
        If (Lang2 = LangName.Deutsch) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._GerNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._GerVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._GerAdjective
            End If
        ElseIf (Lang2 = LangName.English) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._EngNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._EngVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._EngAdjective
            End If
        ElseIf (Lang2 = LangName.Francais) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._FraNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._FraVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._FraAdjective
            End If
        ElseIf (Lang2 = LangName.Espanol) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._SpaNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._SpaVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._SpaAdjective
            End If
        ElseIf (Lang2 = LangName.Italiano) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._ItaNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._ItaVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._ItaAdjective
            End If
        ElseIf (Lang2 = LangName.Portoguese) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._PorNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._PorVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._PorAdjective
            End If
        ElseIf (Lang2 = LangName.Dansk) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._DanNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._DanVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._DanAdjective
            End If
        ElseIf (Lang2 = LangName.Svenska) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._SweNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._SweVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._SweAdjective
            End If
        ElseIf (Lang2 = LangName.Ellenika) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._GreNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._GreVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._GreAdjective
            End If
        ElseIf (Lang2 = LangName.Russkij) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._RusNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._RusVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._RusAdjective
            End If
        ElseIf (Lang2 = LangName.Polski) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._PolNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._PolVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._PolAdjective
            End If
        ElseIf (Lang2 = LangName.Hrvatski) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._CroNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._CroVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._CroAdjective
            End If
        ElseIf (Lang2 = LangName.AnyLang) Then
            If (wordType = "Nom") Then
                wordText2 = pubVocabularyNom(wordIndex)._AnyNomen
            ElseIf (wordType = "Ver") Then
                wordText2 = pubVocabularyVer(wordIndex)._AnyVerb
            ElseIf (wordType = "Adj") Then
                wordText2 = pubVocabularyAdj(wordIndex)._AnyAdjective
            End If
        End If

        ' return Value
        getWord2 = wordText2

    End Function

    Private Sub replaceSpecChars(inFile As String, outFile As String)
        ' Replace special Characters (West-European, East-European, Cyrillic, Greek)
        Dim textAll As String

        ' Input File
        Dim sr As New StreamReader(inFile, System.Text.Encoding.UTF8)
        textAll = sr.ReadToEnd()
        sr.Close()

        ' Output File (LaTeX interpreter needs ASCII)
        Dim sw As New StreamWriter(outFile, False, System.Text.Encoding.ASCII)

        Dim da = Convert.ToChar(&H22)
        ' Changes: German
        textAll = Replace(textAll, "ä", "\" & da & "a").Replace("ö", "\" & da & "o").Replace("ü", "\" & da & "u").Replace("ß", "\ss{}")
        textAll = Replace(textAll, "Ä", "\" & da & "A").Replace("Ö", "\" & da & "O").Replace("Ü", "\" & da & "U")
        ' Changes: other West-European
        textAll = Replace(textAll, "à", "\`{a}").Replace("á", "\'{a}").Replace("â", "\^{a}").Replace("ã", "\~{a}").Replace("å", "\r{a}").Replace("æ", "{\ae}")
        textAll = Replace(textAll, "è", "\`{e}").Replace("é", "\'{e}").Replace("ê", "\^{e}").Replace("ë", "\" & da & "{e}").Replace("ç", "\c{c}")
        textAll = Replace(textAll, "ì", "\`{i}").Replace("í", "\'{i}").Replace("î", "\^{i}").Replace("ï", "\" & da & "{i}").Replace("ñ", "\~{n}")
        textAll = Replace(textAll, "ò", "\`{o}").Replace("ó", "\'{o}").Replace("ô", "\^{o}").Replace("õ", "\~{o}").Replace("ø", "{\o}").Replace("œ", "{\oe}")
        textAll = Replace(textAll, "ù", "\`{u}").Replace("ú", "\'{u}").Replace("û", "\^{u}").Replace("ý", "\'{y}").Replace("ÿ", "y")
        textAll = Replace(textAll, "À", "\`{A}").Replace("Á", "\'{A}").Replace("Â", "\^{A}").Replace("Ã", "\~{A}").Replace("Å", "\r{A}").Replace("Æ", "{\AE}")
        textAll = Replace(textAll, "È", "\`{E}").Replace("É", "\'{E}").Replace("Ê", "\^{E}").Replace("Ë", "\" & da & "{E}").Replace("Ç", "\c{C}")
        textAll = Replace(textAll, "Ì", "\`{I}").Replace("Í", "\'{I}").Replace("Î", "\^{I}").Replace("Ï", "\" & da & "{I}").Replace("Ñ", "\~{N}")
        textAll = Replace(textAll, "Ò", "\`{O}").Replace("Ó", "\'{O}").Replace("Ô", "\^{O}").Replace("Õ", "\~{O}").Replace("Ø", "{\O}").Replace("Œ", "{\OE}")
        textAll = Replace(textAll, "Ù", "\`{U}").Replace("Ú", "\'{U}").Replace("Û", "\^{U}").Replace("Ý", "\'{Y}").Replace("Ÿ", "Y")
        ' Changes: other East-European (\k only with T1)
        textAll = Replace(textAll, "ā", "\={a}").Replace("ă", "\u{a}").Replace("ą", "\c{a}").Replace("ć", "\'{c}").Replace("ĉ", "\^{c}").Replace("ċ", "\.{c}").Replace("č", "\v{c}")
        textAll = Replace(textAll, "ď", "\'{d}").Replace("đ", "\={d}").Replace("ē", "\={e}").Replace("ĕ", "\u{e}").Replace("ė", "\.{e}").Replace("ę", "\c{e}").Replace("ě", "\v{e}")
        textAll = Replace(textAll, "ĝ", "\^{g}").Replace("ğ", "\u{g}").Replace("ġ", "\.{g}").Replace("ģ", "	\'{g}").Replace("ĥ", "\^{h}").Replace("ħ", "\={h}")
        textAll = Replace(textAll, "ĩ", "\~{i}").Replace("ī", "\={i}").Replace("ĭ", "\u{i}").Replace("į", "\c{i}").Replace("ı", "\^{i}").Replace("ĵ", "\^{j}").Replace("ķ", "\c{k}")
        textAll = Replace(textAll, "ĺ", "\'{l}").Replace("ļ", "\c{l}").Replace("ł", "{\l}").Replace("ń", "\'{n}").Replace("ņ", "\c{n}").Replace("ň", "\v{n}")
        textAll = Replace(textAll, "ō", "\={o}").Replace("ŏ", "\u{o}").Replace("ő", "\~{o}").Replace("ŕ", "\'{r}").Replace("ŗ", "\c{r}").Replace("ř", "\v{r}")
        textAll = Replace(textAll, "ś", "\'{s}").Replace("ŝ", "\^{s}").Replace("ş", "\c{s}").Replace("ș", "\c{s}").Replace("š", "\v{s}").Replace("ţ", "\c{t}").Replace("ț", "\c{t}").Replace("ť", "\'{t}").Replace("ŧ", "\={t}")
        textAll = Replace(textAll, "ũ", "\~{u}").Replace("ū", "\={u}").Replace("ŭ", "\u{u}").Replace("ů", "\r{u}").Replace("ű", "\H{u}").Replace("ų", "\c{u}")
        textAll = Replace(textAll, "ŵ", "\^{w}").Replace("ŷ", "\^{y}").Replace("ź", "\'{z}").Replace("ż", "\.{z}").Replace("ž", "\v{z}")
        textAll = Replace(textAll, "Ā", "\={A}").Replace("Ă", "\u{A}").Replace("Ą", "\c{A}").Replace("Ć", "\'{C}").Replace("Ĉ", "\^{C}").Replace("Ċ", "\.{C}").Replace("Č", "\v{C}")
        textAll = Replace(textAll, "Ď", "\v{D}").Replace("Đ", "\={D}").Replace("Ē", "\={E}").Replace("Ĕ", "\u{E}").Replace("Ė", "\.{E}").Replace("Ę", "\c{E}").Replace("Ě", "\v{E}")
        textAll = Replace(textAll, "Ĝ", "\^{G}").Replace("Ğ", "\u{G}").Replace("Ġ", "\.{G}").Replace("Ģ", "	\c{G}").Replace("Ĥ", "\^{H}").Replace("Ħ", "\={H}")
        textAll = Replace(textAll, "Ĩ", "\~{I}").Replace("Ī", "\={I}").Replace("Ĭ", "\u{I}").Replace("Į", "\c{I}").Replace("İ", "\.{I}").Replace("Ĵ", "\^{J}").Replace("Ķ", "\c{K}")
        textAll = Replace(textAll, "Ĺ", "\'{L}").Replace("Ļ", "\c{L}").Replace("Ľ", "\'{L}").Replace("Ŀ", "\.{L}").Replace("Ł", "{\L}").Replace("Ń", "\'{N}").Replace("Ņ", "\c{N}").Replace("Ň", "\v{N}")
        textAll = Replace(textAll, "Ō", "\={O}").Replace("Ŏ", "\u{O}").Replace("Ő", "\~{O}").Replace("Ŕ", "\'{R}").Replace("Ŗ", "\c{R}").Replace("Ř", "\v{R}")
        textAll = Replace(textAll, "Ś", "\'{S}").Replace("Ŝ", "\^{S}").Replace("Ş", "\c{S}").Replace("Ș", "\c{S}").Replace("Š", "\v{S}").Replace("Ţ", "\c{T}").Replace("Ț", "\c{T}").Replace("Ť", "\'{T}").Replace("Ŧ", "\={T}")
        textAll = Replace(textAll, "Ũ", "\~{U}").Replace("Ū", "\={U}").Replace("Ŭ", "\u{U}").Replace("Ů", "\r{U}").Replace("Ű", "\H{U}").Replace("Ų", "\c{U}")
        textAll = Replace(textAll, "Ŵ", "\^{W}").Replace("Ŷ", "\^{Y}").Replace("Ź", "\'{Z}").Replace("Ż", "\.{Z}").Replace("Ž", "\v{Z}")
        ' Changes: Russian Cyrillic (only with OT2, T1)
        textAll = Replace(textAll, "а", "a").Replace("б", "b").Replace("в", "v").Replace("г", "g").Replace("д", "d")
        textAll = Replace(textAll, "е", "e").Replace("ё", "\" & da & "e").Replace("ж", "zh").Replace("з", "z").Replace("и", "i").Replace("й", "\u{i}")
        textAll = Replace(textAll, "к", "k").Replace("л", "l").Replace("м", "m").Replace("н", "n").Replace("о", "o")
        textAll = Replace(textAll, "п", "p").Replace("р", "r").Replace("с", "s").Replace("т", "t").Replace("у", "u")
        textAll = Replace(textAll, "ф", "f").Replace("х", "kh").Replace("ц", "ts").Replace("ч", "ch").Replace("ш", "sh").Replace("щ", "shch")
        textAll = Replace(textAll, "ъ", "p2").Replace("ы", "y").Replace("ь", "p1").Replace("э", "e1").Replace("ю", "yu").Replace("я", "ya")
        textAll = Replace(textAll, "А", "A").Replace("Б", "B").Replace("В", "V").Replace("Г", "G").Replace("Д", "D")
        textAll = Replace(textAll, "Е", "E").Replace("Ё", "\" & da & "E").Replace("Ж", "Zh").Replace("З", "Z").Replace("И", "I").Replace("Й", "\U{i}")
        textAll = Replace(textAll, "К", "K").Replace("Л", "L").Replace("М", "M").Replace("Н", "N").Replace("О", "O")
        textAll = Replace(textAll, "П", "P").Replace("Р", "R").Replace("С", "S").Replace("Т", "T").Replace("У", "U")
        textAll = Replace(textAll, "Ф", "F").Replace("Х", "Kh").Replace("Ц", "Ts").Replace("Ч", "Ch").Replace("Ш", "Sh").Replace("Щ", "Shch")
        textAll = Replace(textAll, "Ъ", "P2").Replace("Ы", "Y").Replace("Ь", "P1").Replace("Э", "E1").Replace("Ю", "Yu").Replace("Я", "Ya")
        ' Changes: other Cyrillic (only with OT2, T1)
        textAll = Replace(textAll, "ѐ", "\`{\cyre}").Replace("ђ", "dj").Replace("ѓ", "\'g").Replace("є", "e2").Replace("ѕ", "d3")
        textAll = Replace(textAll, "і", "i1").Replace("ї", "\cyryi").Replace("ј", "j").Replace("љ", "lj").Replace("њ", "nj")
        textAll = Replace(textAll, "ћ", "c1").Replace("ќ", "\'k").Replace("ѝ", "\`{\cyri}").Replace("ў", "\U{\curu}").Replace("џ", "d2")
        textAll = Replace(textAll, "Ѐ", "\`{\CYRE}").Replace("Ђ", "Dj").Replace("Ѓ", "\'G").Replace("Є", "E2").Replace("Ѕ", "D3")
        textAll = Replace(textAll, "І", "I1").Replace("Ї", "\CYRYI").Replace("Ј", "J").Replace("Љ", "Lj").Replace("Њ", "Nj")
        textAll = Replace(textAll, "Ћ", "C1").Replace("Ќ", "\'K").Replace("Ѝ", "\`{\CYRI}").Replace("Ў", "\U{\CYRU}").Replace("Џ", "D2")
        ' Changes: Greek letters (only with math)
        textAll = Replace(textAll, "α", "a").Replace("β", "b").Replace("γ", "g").Replace("δ", "d").Replace("ε", "e")
        textAll = Replace(textAll, "ζ", "z").Replace("η", "h").Replace("θ", "j").Replace("ι", "i").Replace("κ", "k")
        textAll = Replace(textAll, "λ", "l").Replace("μ", "m").Replace("ν", "n").Replace("ξ", "x").Replace("ο", "o")
        textAll = Replace(textAll, "π", "p").Replace("ρ", "r").Replace("ς", "c").Replace("σ", "s").Replace("τ", "t")
        textAll = Replace(textAll, "υ", "u").Replace("φ", "f").Replace("χ", "q").Replace("ψ", "y").Replace("ω", "w")
        textAll = Replace(textAll, "Α", "A").Replace("Β", "B").Replace("Γ", "G").Replace("Δ", "D").Replace("Ε", "E")
        textAll = Replace(textAll, "Ζ", "Z").Replace("Η", "H").Replace("Θ", "J").Replace("Ι", "I").Replace("Κ", "K")
        textAll = Replace(textAll, "Λ", "L").Replace("Μ", "M").Replace("Ν", "N").Replace("Ξ", "X").Replace("Ο", "O")
        textAll = Replace(textAll, "Π", "P").Replace("Ρ", "R").Replace("Σ", "S").Replace("Τ", "T")
        textAll = Replace(textAll, "Υ", "U").Replace("Φ", "F").Replace("Χ", "Q").Replace("Ψ", "Y").Replace("Ω", "W")
        ' Changes: other Greek (only with math)
        textAll = Replace(textAll, "ά", "'a").Replace("έ", "'e").Replace("ή", "'h").Replace("ί", "'i").Replace("ό", "'o").Replace("ύ", "'u").Replace("ώ", "'w")
        textAll = Replace(textAll, "Ά", "'A").Replace("Έ", "'E").Replace("Ή", "'H").Replace("Ί", "'I").Replace("Ό", "'O").Replace("Ύ", "'U").Replace("Ώ", "'W")
        textAll = Replace(textAll, "ϊ", da & "i").Replace("ΐ", da & "'i").Replace("ϋ", da & "u").Replace("ΰ", da & "'u").Replace("Ϊ", da & "I").Replace("Ϋ", da & "U")
        ' Write and Close
        sw.Write(textAll)
        sw.Close()

    End Sub

End Module


