Socket
Socket
Sign inDemoInstall

yoastseo

Package Overview
Dependencies
201
Maintainers
5
Versions
165
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.88.0 to 1.89.0-rc.0

src/config/content/tr.js

9

CHANGELOG.md

@@ -6,2 +6,11 @@ # Change Log

## 1.89.0 January 25th, 2021
### Enhancements
* Adds Turkish stemmer.
* Adds function words for Turkish.
* Adds the consecutive sentences beginnings assessment for Turkish.
* Adds the sentence length assessment for Turkish.
* Implements the passive voice assessment for Turkish.
* Implements the transition words assessment for Turkish.
## 1.88.0 January 12th, 2021

@@ -8,0 +17,0 @@ ### Enhancements

9

package.json

@@ -12,3 +12,3 @@ {

"license": "GPL-3.0",
"version": "1.88.0",
"version": "1.89.0-rc.0",
"repository": {

@@ -139,3 +139,6 @@ "type": "git",

"/spec/morphology/norwegian/stemmerCoverage/sampleVocabulary.json",
"/spec/morphology/norwegian/stemmerCoverage/generateStems.js"
"/spec/morphology/norwegian/stemmerCoverage/generateStems.js",
"/spec/morphology/turkish/stemmerCoverage/goldStandardStems.json",
"/spec/morphology/turkish/stemmerCoverage/sampleVocabulary.json",
"/spec/morphology/turkish/stemmerCoverage/generateStems.js"
],

@@ -157,3 +160,3 @@ "coveragePathIgnorePatterns": [

},
"gitHead": "c24b6ec3b6c1d64c01aff1bfe7266406097ae848"
"gitHead": "44e66274ad5410e94a05abc67dcdaf38dfbc5a54"
}

@@ -109,2 +109,3 @@ [![Build Status](https://travis-ci.org/Yoast/YoastSEO.js.svg?branch=master)](https://travis-ci.org/Yoast/js-text-analysis)

| Farsi | | | | | | ✅ |
| Turkish | ✅ | ❌<sup>3</sup> | ✅ | ✅ | ✅ | ✅ |

@@ -111,0 +112,0 @@ <sup>1</sup> This means the default upper limit of 20 words has been verified for this language, or the upper limit has been changed.

@@ -37,3 +37,3 @@ "use strict";

const availableLanguages = ["en", "de", "fr", "es", "ru", "it", "nl", "pl", "sv", "pt", "id", "ar", "he", "hu"];
const availableLanguages = ["en", "de", "fr", "es", "ru", "it", "nl", "pl", "sv", "pt", "id", "ar", "he", "hu", "tr"];

@@ -40,0 +40,0 @@ /**

@@ -33,3 +33,3 @@ "use strict";

const availableLanguages = ["en", "de", "es", "fr", "nl", "it", "ru", "pl", "sv", "pt", "id", "ar", "he", "hu"];
const availableLanguages = ["en", "de", "es", "fr", "nl", "it", "ru", "pl", "sv", "pt", "id", "ar", "he", "hu", "tr"];

@@ -36,0 +36,0 @@ /**

@@ -37,3 +37,3 @@ "use strict";

const availableLanguages = ["en", "de", "es", "fr", "nl", "it", "pt", "ru", "ca", "pl", "sv", "hu", "id", "ar", "he"];
const availableLanguages = ["en", "de", "es", "fr", "nl", "it", "pt", "ru", "ca", "pl", "sv", "hu", "id", "ar", "he", "tr"];

@@ -40,0 +40,0 @@ /**

@@ -54,2 +54,6 @@ "use strict";

var _tr = require("./tr");
var _tr2 = _interopRequireDefault(_tr);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -64,3 +68,4 @@

pt: _pt2.default,
he: _he2.default
he: _he2.default,
tr: _tr2.default
};

@@ -67,0 +72,0 @@

@@ -22,3 +22,4 @@ "use strict";

ar: _firstWordExceptions26.default,
hu: _firstWordExceptions28.default
hu: _firstWordExceptions28.default,
tr: _firstWordExceptions30.default
};

@@ -91,2 +92,6 @@

var _firstWordExceptions29 = require("../researches/turkish/firstWordExceptions.js");
var _firstWordExceptions30 = _interopRequireDefault(_firstWordExceptions29);
var _getLanguage = require("./getLanguage.js");

@@ -93,0 +98,0 @@

@@ -24,3 +24,4 @@ "use strict";

hu: hungarianFunctionWords,
nb: norwegianFunctionWords
nb: norwegianFunctionWords,
tr: turkishFunctionWords
};

@@ -93,2 +94,6 @@ };

var _functionWords33 = require("../researches/turkish/functionWords.js");
var _functionWords34 = _interopRequireDefault(_functionWords33);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -131,2 +136,4 @@

const turkishFunctionWords = (0, _functionWords34.default)();
/**

@@ -133,0 +140,0 @@ * Returns the function words for all languages.

@@ -23,3 +23,4 @@ "use strict";

he: _stem22.default,
nb: _stem24.default
nb: _stem24.default,
tr: _stem26.default
};

@@ -82,3 +83,7 @@ };

var _stem25 = require("../morphology/turkish/stem");
var _stem26 = _interopRequireDefault(_stem25);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=getStemForLanguage.js.map

@@ -79,2 +79,7 @@ "use strict";

};
case "tr":
return {
transitionWords: transitionWordsTurkish,
twoPartTransitionWords: _twoPartTransitionWords32.default
};
default:

@@ -213,2 +218,10 @@ case "en":

var _transitionWords31 = require("../researches/turkish/transitionWords.js");
var _transitionWords32 = _interopRequireDefault(_transitionWords31);
var _twoPartTransitionWords31 = require("../researches/turkish/twoPartTransitionWords.js");
var _twoPartTransitionWords32 = _interopRequireDefault(_twoPartTransitionWords31);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -246,2 +259,4 @@

const transitionWordsTurkish = (0, _transitionWords32.default)().allWords;
/**

@@ -248,0 +263,0 @@ * Returns transition words for a specific locale.

@@ -70,3 +70,3 @@ "use strict";

const morphologicalLanguages = ["ru", "tr", "sv", "id", "ar", "he"];
const morphologicalLanguages = ["ru", "tr", "sv", "id", "ar", "he", "tr"];
const periphrasticLanguages = ["en", "de", "nl", "fr", "es", "it", "pt", "cn", "pl"];

@@ -73,0 +73,0 @@ const morphologicalAndPeriphrasticLanguages = ["hu"];

@@ -16,2 +16,6 @@ "use strict";

if (language === "tr") {
return determineSentenceIsPassiveTurkish(sentenceText);
}
if (language === "ar") {

@@ -42,2 +46,8 @@ return determineSentenceIsPassiveArabic(sentenceText);

var _passiveEndings = require("../../turkish/passiveVoice/passiveEndings");
var _passiveEndings2 = _interopRequireDefault(_passiveEndings);
var _nonPassivesTurkish = require("../../turkish/passiveVoice/nonPassivesTurkish");
var _nonPassiveVerbsStartingDi = require("../../indonesian/passiveVoice/nonPassiveVerbsStartingDi");

@@ -77,2 +87,5 @@

const passiveEndingsTurkish = (0, _passiveEndings2.default)();
const passivePrefixIndonesian = "di";

@@ -156,3 +169,2 @@

});
return matchedPassives.length !== 0;

@@ -162,2 +174,33 @@ };

/**
* Filters out words that are passive exceptions from an array.
*
* @param {string[]} nonPassivesTurkish The list of exceptions to check
* @param {string[]} passiveEndings The list of passive verb endings
* @param {string[]} matchedPassives The words from the sentence that could be passives
* @returns {string[]} The array of words with the non-passives filtered out
*
*/
const checkTurkishNonPassivesStemsList = function checkTurkishNonPassivesStemsList(nonPassivesTurkish, passiveEndings, matchedPassives) {
return matchedPassives.filter(passive => nonPassivesTurkish.some(stem => passiveEndings.some(function (ending) {
const pattern = new RegExp("^" + stem + ending + "$");
return !pattern.test(passive);
})));
};
/**
* Checks the passed sentence to see if it contains Turkish passive verb forms and is not found in the non-passive full forms exception list.
*
* @param {string} sentence The sentence to match against.
*
* @returns {Boolean} Whether the sentence contains a Turkish verb passive voice.
*/
const determineSentenceIsPassiveTurkish = function determineSentenceIsPassiveTurkish(sentence) {
const words = (0, _getWords2.default)(sentence);
let matchedPassives = words.filter(word => word.length > 5);
matchedPassives = matchedPassives.filter(word => !_nonPassivesTurkish.nonPassivesFullForms.includes(word));
matchedPassives = checkTurkishNonPassivesStemsList(_nonPassivesTurkish.nonPassiveStems, passiveEndingsTurkish, matchedPassives);
return matchedPassives.some(word => passiveEndingsTurkish.some(ending => word.endsWith(ending)));
};
/**
* Checks the passed sentence to see if it contains Arabic passive verb-forms.

@@ -164,0 +207,0 @@ *

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc