How to use the node-nlp.NerManager function in node-nlp

To help you get started, we’ve selected a few node-nlp 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 leon-ai / leon / server / src / core / ner.js View on Github external
return new Promise(async (resolve, reject) => {
      log.title('NER')
      log.info('Searching for entities...')

      // Need to instanciate on the fly to flush entities
      this.nerManager = new NerManager()

      const { entities, classification } = obj
      // Remove end-punctuation and add an end-whitespace
      const query = `${string.removeEndPunctuation(obj.query)} `
      const expressionsObj = JSON.parse(fs.readFileSync(expressionsFilePath, 'utf8'))
      const { module, action } = classification
      const promises = []

      // Verify the action has entities
      if (typeof expressionsObj[module][action].entities !== 'undefined') {
        const actionEntities = expressionsObj[module][action].entities

        /**
         * Browse action entities
         * Dynamic injection of the action entities depending of the entity type
         */

node-nlp

Library for NLU (Natural Language Understanding) done in Node.js

MIT
Latest version published 4 days ago

Package Health Score

74 / 100
Full package analysis