Japanese (#770)
* added Japanese (Hiragana, Katakana, Kanji) * improved dictionary validation: it is now possible to have the same ideogram with two different transcriptions * fixed frequency updating not working sometimes (in Chinese too)
This commit is contained in:
parent
efa1fb4d79
commit
0ec912f9c9
33 changed files with 1603029 additions and 89 deletions
|
|
@ -243,12 +243,13 @@ def validateDictionary(File dictionaryFile, String alphabet, HashMap<String, Str
|
|||
errorMsg += wordErrors
|
||||
}
|
||||
|
||||
if (uniqueWords.contains(word)) {
|
||||
final uniqueWord = transcription + word
|
||||
if (uniqueWords.contains(uniqueWord)) {
|
||||
lineHasErrors = true
|
||||
errorCount++
|
||||
errorMsg += "Dictionary '${dictionaryFile.name}' is invalid. Found duplicate word: '${word}' on line ${lineNumber}. Remove all duplicates.\n"
|
||||
errorMsg += "Dictionary '${dictionaryFile.name}' is invalid. Found duplicate word: '${word}${!transcription.isEmpty() ? ' [' + transcription + ']' : ''}' on line ${lineNumber}. Remove all duplicates.\n"
|
||||
} else {
|
||||
uniqueWords.add(word)
|
||||
uniqueWords.add(uniqueWord)
|
||||
}
|
||||
|
||||
if (lineHasErrors) {
|
||||
|
|
@ -295,6 +296,10 @@ static def extractAlphabetExtraCharsFromLine(String languageName, String line) {
|
|||
allChars += '\u200C'
|
||||
}
|
||||
|
||||
if (line.contains("PUNCTUATION") && languageName.contains("Japanese")) {
|
||||
allChars += '〇'
|
||||
}
|
||||
|
||||
return DEFAULT + allChars
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue