How to use the @nlpjs/core.Container function in @nlpjs/core

To help you get started, we’ve selected a few @nlpjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github axa-group / nlp.js / packages / core-loader / src / container-bootstrap.js View on Github external
function containerBootstrap(
  srcSettings = {},
  mustLoadEnv = true,
  container,
  preffix,
  pipelines,
  parent
) {
  const instance = container || new Container(preffix);
  instance.parent = parent;
  if (!preffix) {
    instance.register('fs', requestfs);
    instance.use(ArrToObj);
    instance.use(Normalizer);
    instance.use(ObjToArr);
    instance.use(Stemmer);
    instance.use(Stopwords);
    instance.use(Tokenizer);
    instance.use(Timer);
    instance.use(logger);
    instance.use(MemoryStorage);
  }
  let settings = srcSettings;
  if (typeof settings === 'string') {
    settings = {