natural-content
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -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 @@ |
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
19839