Comparing version 6.7.2 to 6.8.0
@@ -27,14 +27,16 @@ /* | ||
// Constructor creates a Lexicon for language | ||
function Lexicon (language, defaultCategory, defaultCategoryCapitalised) { | ||
switch (language) { | ||
case 'EN': | ||
this.lexicon = englishLexicon | ||
break | ||
case 'DU': | ||
this.lexicon = dutchLexicon | ||
break | ||
default: | ||
this.lexicon = dutchLexicon | ||
break | ||
} | ||
function Lexicon (language, defaultCategory, defaultCategoryCapitalised, extendedLexicon) { | ||
const lexicon = (() => { | ||
switch (language) { | ||
case 'EN': | ||
return englishLexicon | ||
case 'DU': | ||
return dutchLexicon | ||
default: | ||
return dutchLexicon | ||
} | ||
})() | ||
this.lexicon = Object.assign(lexicon, extendedLexicon || {}) | ||
if (defaultCategory) { | ||
@@ -41,0 +43,0 @@ this.defaultCategory = defaultCategory |
{ | ||
"name": "natural", | ||
"description": "General natural language (tokenizing, stemming (English, Russian, Spanish), part-of-speech tagging, sentiment analysis, classification, inflection, phonetics, tfidf, WordNet, jaro-winkler, Levenshtein distance, Dice's Coefficient) facilities for node.", | ||
"version": "6.7.2", | ||
"version": "6.8.0", | ||
"homepage": "https://github.com/NaturalNode/natural", | ||
@@ -6,0 +6,0 @@ "repository": { |
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
13789078