Package com.inet.jorthodictionaries
Class BookGenerator_de
- java.lang.Object
-
- com.inet.jorthodictionaries.BookGenerator
-
- com.inet.jorthodictionaries.BookGenerator_de
-
public class BookGenerator_de extends BookGenerator
-
-
Constructor Summary
Constructors Constructor Description 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=editprivate boolean
addDeklinationSubstTable(java.lang.String wikiText, int fromIndex, java.lang.String baseWord)
Implementation of the templates http://de.wiktionary.org/wiki/Vorlage:Deutsch_Substantiv_Übersichtprivate 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 pronomenprivate void
addKonjugationVerbSchwachDoppeltTrennbar(java.util.Properties props)
Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_schwach_doppelt_trennbarprivate 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_reflexivprivate 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_reflexivprivate void
addKonjugationVerbUnregular(java.util.Properties props)
Implementation of the template http://de.wiktionary.org/wiki/Vorlage:Deutsch_Verb_unregelm%C3%A4%C3%9Figprivate 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 Konjugationprivate 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.
-
-
-
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 classBookGenerator
- 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 classBookGenerator
- Parameters:
word
- the test wordwikiText
- 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 ArtikelswikiText
- der gesamte Wikiartikel in Wikisyntaxmarker
- die Phrase, die eine bestimmte Konjugation markiertfromIndex
- 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 textmarker
-
-
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 debuggingkey
- the key of the format table, for debuggingphrase
- 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 wordwikiText
- 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
-
-