Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

synonym-optimizer

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synonym-optimizer - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

3

dist/stopWordsDoc.js

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

stream.write(`:page-partial:\n\n`);
for (let i = 0; i < languages.length; i++) {
const language = languages[i];
for (const language of languages) {
stream.write(`== ${language}\n\n`);

@@ -18,0 +17,0 @@ const languageSyn = helper_1.buildLanguageSyn(helper_1.getIso2fromLocale(language));

@@ -39,6 +39,3 @@ "use strict";

scoreAlternative(alternative, stopWordsToAdd, stopWordsToRemove, stopWordsOverride, identicals, debugHolder) {
// console.log(stemmer.stemWord("baby"));
// console.log(stopWordsToAdd);
const stopwords = this.getStopWords(stopWordsToAdd, stopWordsToRemove, stopWordsOverride);
// console.log(stopwords);
const filteredAlt = this.getStemmedWords(alternative, stopwords);

@@ -59,3 +56,2 @@ if (debugHolder) {

}
// console.log(wordsWithPos);
// score

@@ -67,6 +63,4 @@ const score = this.getScore(wordsWithPos);

return score;
// console.log(score);
}
getStemmedWords(text, stopwords) {
// console.log(`getStemmedWords: ${text}`);
const res = this.languageSyn

@@ -83,3 +77,2 @@ .extractWords(text)

});
// console.log(`getStemmedWords result: ${res}`);
return res;

@@ -108,4 +101,2 @@ }

if (this.languageSyn.stemmer) {
//console.log(`ok ${lang} is valid`);
//console.log(`orig: ${word}, stemmed: ${stemmersCache[lang].stemWord(word)}`);
return this.languageSyn.stemmer.stemWord(word);

@@ -112,0 +103,0 @@ }

{
"name": "synonym-optimizer",
"version": "5.0.0",
"version": "5.1.0",
"description": "Finds the text which has the least number of repetitions",

@@ -55,3 +55,3 @@ "main": "dist/index.js",

"@types/wink-tokenizer": "^4.0.1",
"rosaenlg-filter": "5.0.0",
"rosaenlg-filter": "5.1.0",
"snowball-stemmer.jsx": "^0.2.3",

@@ -69,3 +69,3 @@ "stopwords-de": "^0.3.0",

},
"gitHead": "f29cc6f345687b2901f66077f413cecb0ba0d6d7"
"gitHead": "11645a24749c02832b29d6ef71cdf943f89ea81a"
}

@@ -77,6 +77,10 @@ <!--

## dependencies and licences
## Misc
The build writes stopwords a asciidoc in the `rosaenlg-doc` module.
## Dependencies and licences
* `wink-tokenizer` to tokenize sentences in multiple languages (MIT).
* `stopwords-en/de/fs/it/es` for standard stopwords lists per language (MIT).
* `snowball-stemmer` to stem words per language (MIT).

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc