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

natural-content

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

natural-content - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

index.js

@@ -109,3 +109,3 @@ var _ = require('underscore');

// Calculate sum & register the tf for min & max computation
if (stats.words[word]) {
if (stats.words[word] && stats.words[word].tfs) {
stats.words[word].tfs.push(tfs[word]);

@@ -149,3 +149,3 @@ stats.words[word].tfSum += tfs[word];

if (stats.words[word]) {
if (stats.words[word] && stats.words[word].tfIdfs && stats.words[word].idfs) {
stats.words[word].tfIdfs.push(tfIdf[word]);

@@ -152,0 +152,0 @@ stats.words[word].tfIdfSum += tfIdf[word];

module.exports.stopwords = [
'*', 'à', 'à demi', 'être', 'sa', 'r', 'j', 'm', 'e', 'b', 'i', 'v', 'f', 'o', 'u', 'x', 'z', 'h', 'k', 'p',
'&', '*', 'à', 'à demi', 'être', 'sa', 'r', 'j', 'm', 'e', 'b', 'i', 'v', 'f', 'o', 'u', 'x', 'z', 'h', 'k', 'p',
'g', 'q', 'fr', 'zh', 'cn', 'kk', 'do', 'fu', 'vo', 'ga', 'op', 'mu', 'lo', 'cf', 'bo', 'mA', 'qg', 'be',

@@ -4,0 +4,0 @@ 'ad', 'ar', 'at', 'dj', 'bu', 'yu', 'ku', 'fm', 'dA', 'no', 'mr', 'of', 'fi', 'is', 'ii', 'so', 'vu', 'to',

{
"name": "natural-content",
"version": "1.0.2",
"version": "1.0.3",
"description": "A set of natural functions like tf.idf, extract words & n-grams, ... (experimental project)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,7 +24,7 @@ var assert = require("assert");

words = natural.getWords("word1 word2 word3 word4. le la sur word5", false);
console.log("words", words);
//console.log("words", words);
assert(words.length === 5);
words = natural.getWords("word1 word2 word3 1234 word4 156,78. le la sur word5", false);
console.log(words);
//console.log(words);
assert(words.length === 5);

@@ -31,0 +31,0 @@

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