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.6 to 1.0.7

1

index.js

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

.replace(/[’«»'";:,.\/(\/)\/!\/?\\-]/g, WORD_SEPARATOR) // Remove punctuations
.replace(/[\W_]+/g," ") // Remove non alphanumeric char
.replace(/ +/g, WORD_SEPARATOR) // remove multiple spaces

@@ -43,0 +44,0 @@ .toLowerCase()

5

lib/stopwords-fr.js
module.exports.stopwords = [
'&',
'*',
'cookies',
'à',

@@ -61,3 +60,3 @@ 'à demi',

'bon',
'c',
'c',
'ça',

@@ -64,0 +63,0 @@ 'car',

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

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

@@ -20,3 +20,5 @@ var assert = require("assert");

it('Words', function() {
var words = natural.getWords("word1 word2 word3 word4. le la sur word5", true);
// Non alphanumeric are ignored
var words = natural.getWords("word1 word2 word3 word4. le la sur word5 & @' $ < >", true);
//console.log("words", words);
assert(words.length === 8);

@@ -23,0 +25,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