How to use the @nlpjs/builtin-duckling.BuiltinDuckling function in @nlpjs/builtin-duckling

To help you get started, we’ve selected a few @nlpjs/builtin-duckling 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 / node-nlp / src / nlp / nlp-manager.js View on Github external
}
    this.container = this.settings.container;
    this.container.registerConfiguration('ner', {
      entityPreffix: '%',
      entitySuffix: '%',
    });
    this.container.register('fs', requestfs);
    this.container.register('Language', Language, false);
    this.container.use(LangAll);
    this.container.use(Evaluator);
    this.container.use(Template);
    this.nlp = new Nlp(this.settings);
    this.sentimentManager = new SentimentManager();
    if (this.settings.ner) {
      if (this.settings.ner.ducklingUrl || this.settings.ner.useDuckling) {
        const builtin = new BuiltinDuckling(this.settings.ner);
        this.container.register('extract-builtin-??', builtin, true);
      } else {
        const builtin = new BuiltinMicrosoft(this.settings.ner);
        this.container.register('extract-builtin-??', builtin, true);
      }
    } else {
      const builtin = new BuiltinMicrosoft(this.settings.ner);
      this.container.register('extract-builtin-??', builtin, true);
    }
  }

@nlpjs/builtin-duckling

Builtin Named Entity Recognition with Duckling

MIT
Latest version published 4 days ago

Package Health Score

80 / 100
Full package analysis

Popular @nlpjs/builtin-duckling functions

Similar packages