@nlpjs/builtin-duckling
Advanced tools
Comparing version 4.0.0-rc.13 to 4.0.0-rc.16
{ | ||
"name": "@nlpjs/builtin-duckling", | ||
"version": "4.0.0-rc.13", | ||
"version": "4.0.0-rc.16", | ||
"description": "Builtin Named Entity Recognition with Duckling", | ||
@@ -28,5 +28,5 @@ "author": { | ||
"dependencies": { | ||
"@nlpjs/core": "^4.0.0-rc.13" | ||
"@nlpjs/core": "^4.0.0-rc.16" | ||
}, | ||
"gitHead": "1150a72faf75391875ccd9f6165e775f121c32b1" | ||
"gitHead": "b1db0d0a691fef7821c5fe718e4fad614dd388ad" | ||
} |
@@ -54,10 +54,2 @@ /* | ||
function getCulture(locale) { | ||
const result = cultures[locale]; | ||
if (result) { | ||
return result; | ||
} | ||
return locale ? `${locale}_${locale.toUpperCase()}` : 'en_US'; | ||
} | ||
class BuiltinDuckling extends Clonable { | ||
@@ -104,3 +96,3 @@ constructor(settings = {}, container = defaultContainer) { | ||
text: utterance, | ||
locale: getCulture(language), | ||
locale: BuiltinDuckling.getCulture(language), | ||
}); | ||
@@ -272,4 +264,12 @@ | ||
} | ||
static getCulture(locale) { | ||
const result = cultures[locale]; | ||
if (result) { | ||
return result; | ||
} | ||
return locale ? `${locale}_${locale.toUpperCase()}` : 'en_US'; | ||
} | ||
} | ||
module.exports = BuiltinDuckling; |
11265
Updated@nlpjs/core@^4.0.0-rc.16