How to use @nlpjs/core-loader - 6 common examples

To help you get started, we’ve selected a few @nlpjs/core-loader 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-util.js View on Github external
static getTokenizer(locale) {
    if (!locale) {
      return new Tokenizer();
    }
    const name = `Tokenizer${locale.slice(0, 1).toUpperCase()}${locale.slice(
      1
    )}`;
    const TokenizerClass = LangAll[name];
    return TokenizerClass
      ? new TokenizerClass(undefined, true)
      : new Tokenizer(undefined, true);
  }
github axa-group / nlp.js / packages / node-nlp / src / nlp / nlp-util.js View on Github external
static getTokenizer(locale) {
    if (!locale) {
      return new Tokenizer();
    }
    const name = `Tokenizer${locale.slice(0, 1).toUpperCase()}${locale.slice(
      1
    )}`;
    const TokenizerClass = LangAll[name];
    return TokenizerClass
      ? new TokenizerClass(undefined, true)
      : new Tokenizer(undefined, true);
  }
github axa-group / nlp.js / packages / node-nlp / src / nlp / nlp-util.js View on Github external
da: true,
  fi: true,
  de: true,
  hu: true,
  ga: true,
  ro: true,
  sl: true,
  ta: false,
  th: false,
  tr: true,
  zh: false,
};

NlpUtil.tokenizers = {};

containerBootstrap({}, true, defaultContainer);
defaultContainer.use(LangAll.LangAll);

module.exports = NlpUtil;
github axa-group / nlp.js / packages / node-nlp / src / nlp / nlp-manager.js View on Github external
constructor(settings = {}) {
    this.settings = settings;
    if (!this.settings.container) {
      this.settings.container = containerBootstrap();
    }
    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);
github axa-group / nlp.js / packages / node-nlp / src / nlp / nlp-util.js View on Github external
static getStemmer(locale) {
    if (!locale) {
      return new BaseStemmer();
    }
    const name = `Stemmer${locale.slice(0, 1).toUpperCase()}${locale.slice(1)}`;
    const Stemmer = LangAll[name];
    return Stemmer ? new Stemmer() : new BaseStemmer();
  }
github axa-group / nlp.js / packages / node-nlp / src / nlp / nlp-util.js View on Github external
fi: true,
  de: true,
  hu: true,
  ga: true,
  ro: true,
  sl: true,
  ta: false,
  th: false,
  tr: true,
  zh: false,
};

NlpUtil.tokenizers = {};

containerBootstrap({}, true, defaultContainer);
defaultContainer.use(LangAll.LangAll);

module.exports = NlpUtil;

@nlpjs/core-loader

Core

MIT
Latest version published 1 year ago

Package Health Score

72 / 100
Full package analysis

Similar packages