···120 },
121 {
122 "type": "string",
123- "description": "Pitch level of each mora with H representing high and L representing low. For example: HHLL for a 4 mora word.",
124 "pattern": "^[HL]+$"
125 }
126 ]
···120 },
121 {
122 "type": "string",
123+ "description": "Pitch level of each mora with H representing high and L representing low. For example: HHLL for a 4 mora word. Add an additional pitch level at the end to explicitly define the suffix.",
124 "pattern": "^[HL]+$"
125 }
126 ]
···330 * @returns {string}
331 */
332 _pitchValueToPattJJ(numberOfMora, pitchValue) {
333+ if (typeof pitchValue === 'string') {
334+ // the suffix may be set in the dictionary explicitly by appending an extra value
335+ const pitchValueExtended = pitchValue + pitchValue[pitchValue.length - 1];
336+ return pitchValueExtended.slice(0, numberOfMora + 1);
337+ }
338 if (numberOfMora >= 1) {
339 if (pitchValue === 0) {
340 // Heiban