Class BookGenerator_ru_templates


  • public class BookGenerator_ru_templates
    extends BookGenerator
    All String include kyrillic charcters. If you have not a kyrillic keyboard then only copy and paste it. Do not enter any string with a latin keyboard
    • Constructor Detail

      • BookGenerator_ru_templates

        BookGenerator_ru_templates​(BookGenerator_ru generator)
    • Method Detail

      • isValidWord

        protected boolean isValidWord​(java.lang.String word)
        We search only templates and not valid rules.
        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)
        Because it are templates this is ever false.
        Specified by:
        isValidLanguage in class BookGenerator
        Parameters:
        word - the test word
        wikiText - die decription from Wiktionary
        Returns:
        true if valid
      • findRules

        private BookGenerator_ru.Template findRules​(java.lang.String word,
                                                    java.lang.String wikiText)
        Create a template and add all rules.
        Parameters:
        word -
        wikiText -
        Returns:
      • findEnding

        private java.lang.String findEnding​(java.lang.String wikiText,
                                            int idx)
        Find a single ending to the current rule.