Package com.inet.jorthodictionaries
Class BookGenerator_ru
- java.lang.Object
-
- com.inet.jorthodictionaries.BookGenerator
-
- com.inet.jorthodictionaries.BookGenerator_ru
-
public class BookGenerator_ru 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
BookGenerator_ru.Template
Described the needed informations of a template.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Hashtable<java.lang.String,BookGenerator_ru.Template>
templates
-
Constructor Summary
Constructors Constructor Description BookGenerator_ru()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
findRuleAndAddWords(java.lang.String word, java.lang.String wikiText)
Find the placholder of templates and add the words that was build with this templates.(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
normalizeString(java.lang.String str)
private java.util.Properties
parseRule(java.lang.String wikiText, int idxStart, int idxEnd)
Read the inforamtions of the template placeholder(package private) void
start(java.io.File file)
Need 2 run.-
Methods inherited from class com.inet.jorthodictionaries.BookGenerator
addWord, getBook, indexOf, isValidWord, main, save
-
-
-
-
Field Detail
-
templates
private java.util.Hashtable<java.lang.String,BookGenerator_ru.Template> templates
-
-
Method Detail
-
start
void start(java.io.File file) throws java.lang.Exception
Need 2 run. First are parsed the templates. Then start the real parsing.- Overrides:
start
in classBookGenerator
- Throws:
java.lang.Exception
-
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
-
findRuleAndAddWords
private void findRuleAndAddWords(java.lang.String word, java.lang.String wikiText)
Find the placholder of templates and add the words that was build with this templates.
-
parseRule
private java.util.Properties parseRule(java.lang.String wikiText, int idxStart, int idxEnd)
Read the inforamtions of the template placeholder
-
normalizeString
private java.lang.String normalizeString(java.lang.String str)
-
-