diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-07-26 19:45:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 19:45:30 -0400 |
commit | b0596c8a3c6eb7073750ed07ba862b0ba2d44140 (patch) | |
tree | 71df0f7b1a70a7495bc41a28bdf24d4cac4ff5db /ext/js/language/sandbox/japanese-util.js | |
parent | a9710b8acf6370f229098b172eb2a3aa65ae5dc7 (diff) |
Rename pitchAccent in source code (#1852)
* Rename pitchAccentPosition to pitchAccentDownstepPosition
* Rename function
* Rename
* Rename
* pitches => pronunciations
Diffstat (limited to 'ext/js/language/sandbox/japanese-util.js')
-rw-r--r-- | ext/js/language/sandbox/japanese-util.js | 18 |
1 files changed, 9 insertions, 9 deletions
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; } |