UNPKG

yoastseo

Version:

Yoast client-side content analysis

25 lines (24 loc) 755 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = stem; var _turkishStemmer = _interopRequireDefault(require("../../../../../../vendor/turkishStemmer")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * Stems Turkish words. * * @param {string} word The word to stem. * @param {Object} morphologyData The Turkish morphology data. * * @returns {string} The stemmed word. */ function stem(word, morphologyData) { word = word.toLowerCase(); word = word.replace("'", ""); const stemmer = new _turkishStemmer.default(morphologyData); stemmer.setCurrent(word); stemmer.stem(); return stemmer.getCurrent(); } //# sourceMappingURL=stem.js.map