@nlpjs/ner
Advanced tools
Comparing version 4.11.0 to 4.12.0
{ | ||
"name": "@nlpjs/ner", | ||
"version": "4.11.0", | ||
"version": "4.12.0", | ||
"description": "Named Entity Recognition", | ||
@@ -32,3 +32,3 @@ "author": { | ||
}, | ||
"gitHead": "9b24db3f2a381399cad134bdab734e36744fcde1" | ||
"gitHead": "381e2a74ebbb634ba944cf05355232d580189a78" | ||
} |
@@ -80,13 +80,19 @@ /* | ||
addRule(locale = '*', name, type, rule) { | ||
if (!this.rules[locale]) { | ||
this.rules[locale] = {}; | ||
if (Array.isArray(locale)) { | ||
for (let i = 0; i < locale.length; i += 1) { | ||
this.addRule(locale[i], name, type, rule); | ||
} | ||
} else { | ||
if (!this.rules[locale]) { | ||
this.rules[locale] = {}; | ||
} | ||
if (!this.rules[locale][name]) { | ||
this.rules[locale][name] = { | ||
name, | ||
type, | ||
rules: [], | ||
}; | ||
} | ||
this.rules[locale][name].rules.push(rule); | ||
} | ||
if (!this.rules[locale][name]) { | ||
this.rules[locale][name] = { | ||
name, | ||
type, | ||
rules: [], | ||
}; | ||
} | ||
this.rules[locale][name].rules.push(rule); | ||
} | ||
@@ -93,0 +99,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
46879
1368