From b0596c8a3c6eb7073750ed07ba862b0ba2d44140 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 26 Jul 2021 19:45:30 -0400 Subject: Rename pitchAccent in source code (#1852) * Rename pitchAccentPosition to pitchAccentDownstepPosition * Rename function * Rename * Rename * pitches => pronunciations --- ext/js/language/sandbox/japanese-util.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'ext/js/language/sandbox/japanese-util.js') diff --git a/ext/js/language/sandbox/japanese-util.js b/ext/js/language/sandbox/japanese-util.js index c7f79751..9257e1e5 100644 --- a/ext/js/language/sandbox/japanese-util.js +++ b/ext/js/language/sandbox/japanese-util.js @@ -239,26 +239,26 @@ const JapaneseUtil = (() => { // Mora functions - isMoraPitchHigh(moraIndex, pitchAccentPosition) { - switch (pitchAccentPosition) { + isMoraPitchHigh(moraIndex, pitchAccentDownstepPosition) { + switch (pitchAccentDownstepPosition) { case 0: return (moraIndex > 0); case 1: return (moraIndex < 1); - default: return (moraIndex > 0 && moraIndex < pitchAccentPosition); + default: return (moraIndex > 0 && moraIndex < pitchAccentDownstepPosition); } } - getPitchCategory(text, pitchAccentPosition, isVerbOrAdjective) { - if (pitchAccentPosition === 0) { + getPitchCategory(text, pitchAccentDownstepPosition, isVerbOrAdjective) { + if (pitchAccentDownstepPosition === 0) { return 'heiban'; } if (isVerbOrAdjective) { - return pitchAccentPosition > 0 ? 'kifuku' : null; + return pitchAccentDownstepPosition > 0 ? 'kifuku' : null; } - if (pitchAccentPosition === 1) { + if (pitchAccentDownstepPosition === 1) { return 'atamadaka'; } - if (pitchAccentPosition > 1) { - return pitchAccentPosition >= this.getKanaMoraCount(text) ? 'odaka' : 'nakadaka'; + if (pitchAccentDownstepPosition > 1) { + return pitchAccentDownstepPosition >= this.getKanaMoraCount(text) ? 'odaka' : 'nakadaka'; } return null; } -- cgit v1.2.3