UNPKG

arpabet-and-ipa-convertor-ts

Version:

Typescript code to convert between Arpabet and IPA phonetic transcriptions

27 lines (26 loc) 892 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Stress = void 0; var StressType; (function (StressType) { StressType[StressType["No"] = 0] = "No"; StressType[StressType["Primary"] = 1] = "Primary"; StressType[StressType["Secondary"] = 2] = "Secondary"; })(StressType || (StressType = {})); var Stress = /** @class */ (function () { function Stress(type, ipa) { this.type = type; this.ipa = ipa; } Stress.prototype.markIpa = function () { return this.ipa; }; Stress.prototype.markArpabet = function () { return this.type; }; Stress.No = new Stress(StressType.No, ''); // 无重音 Stress.Primary = new Stress(StressType.Primary, '\u02c8'); // 重音 Stress.Secondary = new Stress(StressType.Secondary, '\u02cc'); // 次重音 return Stress; }()); exports.Stress = Stress;