natural-content
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -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() |
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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19904
1112