remove unneeded feature

Unidic actually has a field for the base form of the input
This commit is contained in:
siikamiika 2019-11-05 02:43:04 +02:00
parent 1bf48d24ef
commit 1700318988

View File

@ -102,11 +102,7 @@ function jpDistributeFuriganaInflected(expression, reading, source) {
const shortest = Math.min(source.length, expression.length);
const sourceHiragana = jpKatakanaToHiragana(source);
const expressionHiragana = jpKatakanaToHiragana(expression);
while (
stemLength < shortest &&
// sometimes an expression can use a kanji that's different from the source
(!jpIsKana(source[stemLength]) || (sourceHiragana[stemLength] === expressionHiragana[stemLength]))
) {
while (stemLength < shortest && sourceHiragana[stemLength] === expressionHiragana[stemLength]) {
++stemLength;
}
const offset = source.length - stemLength;