taipa
Version:
Taiwanese morphological parsing library
39 lines • 2.6 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.inflectedAdverbialParticles = exports.proceedingAdverbialParticles = exports.inflectedPersonalPronouns = exports.inflectedPhrasalVerbParticles = exports.inflectedVerbs = exports.isPhrasalVerbVpp = exports.isPhrasalVerbVp = void 0;
const inflector_1 = require("../change/inflector");
const dictionary_1 = require("./dictionary");
const tonalres_1 = require("../tonal/tonalres");
function isPhrasalVerbVp(token1, token2) {
if (dictionary_1.baseVerbs.includes(token1) && dictionary_1.basePhrasalVerbParticles.includes(token2))
return true;
return false;
}
exports.isPhrasalVerbVp = isPhrasalVerbVp;
function isPhrasalVerbVpp(token1, token2, token3) {
if (dictionary_1.baseVerbs.includes(token1) &&
dictionary_1.basePhrasalVerbParticles.includes(token2) &&
dictionary_1.basePhrasalVerbParticles.includes(token3))
return true;
return false;
}
exports.isPhrasalVerbVpp = isPhrasalVerbVpp;
exports.inflectedVerbs = dictionary_1.baseVerbs.map(
// get the first element of the returned array
(it) => (0, inflector_1.inflectDesinence)(it).getForms()[0].literal);
exports.inflectedPhrasalVerbParticles = dictionary_1.basePhrasalVerbParticles.map((it) => it === dictionary_1.ParticlesPhrasalVerb.cut
? (0, inflector_1.inflectPhrasalVerbParticle)(dictionary_1.ParticlesPhrasalVerb.cut, tonalres_1.TonalLetterTags.f).getForms()[0].literal
: it === dictionary_1.ParticlesPhrasalVerb.khih
? (0, inflector_1.inflectPhrasalVerbParticle)(dictionary_1.ParticlesPhrasalVerb.khih, tonalres_1.TonalLetterTags.f).getForms()[0].literal
: it === dictionary_1.ParticlesPhrasalVerb.laih
? (0, inflector_1.inflectPhrasalVerbParticle)(dictionary_1.ParticlesPhrasalVerb.laih, tonalres_1.TonalLetterTags.z).getForms()[0].literal
: it === dictionary_1.ParticlesPhrasalVerb.tiurh
? (0, inflector_1.inflectPhrasalVerbParticle)(dictionary_1.ParticlesPhrasalVerb.tiurh, tonalres_1.TonalLetterTags.w).getForms()[0].literal
: '');
exports.inflectedPersonalPronouns = dictionary_1.basePersonalPronouns.map((it) => (0, inflector_1.inflectDesinence)(it).getForms()[0].literal);
exports.proceedingAdverbialParticles = {
long: (0, inflector_1.inflectDesinence)(dictionary_1.ParticlesAdverbial.longy.toString()).getForms()[0]
.literal,
};
exports.inflectedAdverbialParticles = dictionary_1.baseAdverbialParticles.map((it) => (0, inflector_1.inflectDesinence)(it).getForms()[0].literal);
//# sourceMappingURL=rules.js.map