Class BookGenerator_en

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.regex.Pattern english  
      private java.util.regex.Pattern languages  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean isValidLanguage​(java.lang.String word, java.lang.String wikiText)
      Check if a word is a valid word of the current language.
      private java.lang.String trim​(java.lang.String word)
      Removes quotes and parenthesis
      • Methods inherited from class java.lang.Object

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

      • english

        private final java.util.regex.Pattern english
      • languages

        private final java.util.regex.Pattern languages
    • Constructor Detail

      • BookGenerator_en

        public BookGenerator_en()
    • Method Detail

      • 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
      • trim

        private java.lang.String trim​(java.lang.String word)
        Removes quotes and parenthesis
        Parameters:
        word - the trimming word
        Returns:
        the new word