Class BookGenerator_de

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addDeklinationAdjektiv​(java.lang.String wordStamm)
      Add the Adjective Declination for the given word root.
      private void addDeklinationAdjektiv​(java.util.Properties props)
      Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deklinationsseite_Adjektiv A sample can see at http://de.wiktionary.org/w/index.php?title=hoch_%28Deklination%29&action=edit
      private boolean addDeklinationSubstTable​(java.lang.String wikiText, int fromIndex, java.lang.String baseWord)
      Implementation of the templates http://de.wiktionary.org/wiki/Vorlage:Deutsch_Substantiv_Übersicht
      private void addFormatedWordPhrase​(java.lang.String baseWord, java.lang.String key, java.lang.String phrase)
      Add a formated word phrase like it used in some format tables.
      private void addIndefinitpronomen​(java.lang.String word, java.lang.String wikiText)
      Add the declination of pronomen
      private void addKonjugationVerbSchwachDoppeltTrennbar​(java.util.Properties props)
      Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_doppelt_trennbar
      private void addKonjugationVerbSchwachTrennbar​(java.util.Properties props, boolean reflexiv)
      Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_trennbar Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_trennbar_reflexiv
      private void addKonjugationVerbSchwachUntrennbar​(java.util.Properties props, boolean reflexiv)
      Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_untrennbar Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_untrennbar_reflexiv
      private void addKonjugationVerbUnregular​(java.util.Properties props)
      Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_unregelm%C3%A4%C3%9Fig
      private void addLinkWords​(java.lang.String baseWord, java.lang.String wikiText, java.lang.String marker)
      Add all valid word that are in links (double brackets like [[word]]).
      private boolean addWordPhrase​(java.lang.String phrase)
      Substantive sind alle mit Artikel abgelegt und einige Verben zerfallen bei der Konjugation
      private java.lang.String getChapter​(java.lang.String wikiText, int headerIdx)
      Get the chapter on the current position.
      private java.lang.String getTable​(java.lang.String wikiText, java.lang.String tableName, int fromIndex)
      Liefert einen Substring mit der aktuellen Konjugation/Flexion Tabelle des Wikitextes
      (package private) boolean isValidLanguage​(java.lang.String word, java.lang.String wikiText)
      Check if a word is a valid word of the current language.
      protected boolean isValidWord​(java.lang.String word)
      Check if the word is valid word.
      private java.lang.String removeHtmlFormating​(java.lang.String word)  
      private boolean searchExtendsWords​(java.lang.String baseWord, java.lang.String wikiText, java.lang.String marker)  
      private void searchFlexion​(java.lang.String word, java.lang.String wikiText)  
      private boolean searchWordAndAdd​(java.lang.String baseWord, java.lang.String wikiText, java.lang.String marker, int fromIndex)
      Die Flexionen und Konjugationen eines Wortes sind durch bestimmte Phrasen gemarked.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BookGenerator_de

        public BookGenerator_de()
    • Method Detail

      • isValidWord

        protected boolean isValidWord​(java.lang.String word)
        Description copied from class: BookGenerator
        Check if the word is valid word. This exclude help pages and some phrases. It should be call ever before addWord(String)
        Overrides:
        isValidWord in class BookGenerator
        Parameters:
        word - the to check
        Returns:
        true, if the word is valid
      • isValidLanguage

        boolean isValidLanguage​(java.lang.String word,
                                java.lang.String wikiText)
        Description copied from class: BookGenerator
        Check if a word is a valid word of the current language. With function getBook().addWord() you can add additional Flexion of the word. The current word self does not need added.
        Specified by:
        isValidLanguage in class BookGenerator
        Parameters:
        word - the test word
        wikiText - die decription from Wiktionary
        Returns:
        true if valid
      • searchFlexion

        private final void searchFlexion​(java.lang.String word,
                                         java.lang.String wikiText)
      • getChapter

        private java.lang.String getChapter​(java.lang.String wikiText,
                                            int headerIdx)
        Get the chapter on the current position. If a next chapter line is not find then the completely wikiText is return.
        Parameters:
        wikiText -
        headerIdx - position in the header line
        Returns:
        a chapter or all text.
      • getTable

        private java.lang.String getTable​(java.lang.String wikiText,
                                          java.lang.String tableName,
                                          int fromIndex)
        Liefert einen Substring mit der aktuellen Konjugation/Flexion Tabelle des Wikitextes
      • searchWordAndAdd

        private final boolean searchWordAndAdd​(java.lang.String baseWord,
                                               java.lang.String wikiText,
                                               java.lang.String marker,
                                               int fromIndex)
        Die Flexionen und Konjugationen eines Wortes sind durch bestimmte Phrasen gemarked.
        Parameters:
        baseWord - Hauptwort, Name des Artikels
        wikiText - der gesamte Wikiartikel in Wikisyntax
        marker - die Phrase, die eine bestimmte Konjugation markiert
        fromIndex - Startposition ab der die Phrase gesucht werden soll
        Returns:
        true, wenn ein richtiges Wort gefunden werden konnte.
      • searchExtendsWords

        private boolean searchExtendsWords​(java.lang.String baseWord,
                                           java.lang.String wikiText,
                                           java.lang.String marker)
      • addLinkWords

        private void addLinkWords​(java.lang.String baseWord,
                                  java.lang.String wikiText,
                                  java.lang.String marker)
        Add all valid word that are in links (double brackets like [[word]]).
        Parameters:
        baseWord -
        wikiText - the searching text
        marker -
      • addFormatedWordPhrase

        private final void addFormatedWordPhrase​(java.lang.String baseWord,
                                                 java.lang.String key,
                                                 java.lang.String phrase)
        Add a formated word phrase like it used in some format tables.
        Parameters:
        baseWord - the lemma word, for debugging
        key - the key of the format table, for debugging
        phrase - the word or phrase, can also be null or empty
      • addWordPhrase

        private final boolean addWordPhrase​(java.lang.String phrase)
        Substantive sind alle mit Artikel abgelegt und einige Verben zerfallen bei der Konjugation
      • addDeklinationAdjektiv

        private void addDeklinationAdjektiv​(java.util.Properties props)
        Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deklinationsseite_Adjektiv A sample can see at http://de.wiktionary.org/w/index.php?title=hoch_%28Deklination%29&action=edit
        Parameters:
        wikiText -
        idx -
      • addDeklinationAdjektiv

        private void addDeklinationAdjektiv​(java.lang.String wordStamm)
        Add the Adjective Declination for the given word root.
        Parameters:
        wordStamm - the word root, can be null
      • addIndefinitpronomen

        private void addIndefinitpronomen​(java.lang.String word,
                                          java.lang.String wikiText)
        Add the declination of pronomen
        Parameters:
        word - the lemma word
        wikiText - the wiki text
      • addDeklinationSubstTable

        private boolean addDeklinationSubstTable​(java.lang.String wikiText,
                                                 int fromIndex,
                                                 java.lang.String baseWord)
        Implementation of the templates http://de.wiktionary.org/wiki/Vorlage:Deutsch_Substantiv_Übersicht
      • removeHtmlFormating

        private java.lang.String removeHtmlFormating​(java.lang.String word)
      • addKonjugationVerbUnregular

        private void addKonjugationVerbUnregular​(java.util.Properties props)
        Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_unregelm%C3%A4%C3%9Fig
      • addKonjugationVerbSchwachUntrennbar

        private void addKonjugationVerbSchwachUntrennbar​(java.util.Properties props,
                                                         boolean reflexiv)
        Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_untrennbar Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_untrennbar_reflexiv
      • addKonjugationVerbSchwachTrennbar

        private void addKonjugationVerbSchwachTrennbar​(java.util.Properties props,
                                                       boolean reflexiv)
        Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_trennbar Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_trennbar_reflexiv
      • addKonjugationVerbSchwachDoppeltTrennbar

        private void addKonjugationVerbSchwachDoppeltTrennbar​(java.util.Properties props)
        Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_doppelt_trennbar