Commits

Lars Yencken  committed ed5f866

Adds no more than 4 mora per kanji constraint.

  • Participants
  • Parent commits 54892af

Comments (0)

Files changed (1)

File src/gpaligner/AlignmentGenerator.scala

         (Japanese.scriptType(grapheme) match {
             case ScriptType.Hiragana => grapheme == phoneme
             case ScriptType.Katakana => grapheme == phoneme
+            case ScriptType.Kanji => phoneme.length <= 4 * grapheme.length
             case _ => true
         })
     }