0.0.9 • Published 1 month ago

@bpinternal/entities v0.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

Entities

Botpress Entities Extractor

Install

npm i @bpinternal/entities

Usage

import { lists } from '@bpinternal/entities'

const listEntities: lists.ListEntityDef[] = [
  {
    name: 'fruit',
    fuzzy: 'medium',
    values: [
      { name: 'Blueberry', synonyms: ['blueberries', 'blueberry', 'blue berries', 'blue berry'] },
      { name: 'Strawberry', synonyms: ['strawberries', 'strawberry', 'straw berries', 'straw berry'] },
      { name: 'Raspberry', synonyms: ['raspberries', 'raspberry', 'rasp berries', 'rasp berry'] },
      { name: 'Apple', synonyms: ['apple', 'apples', 'red apple', 'yellow apple'] }
    ]
  },
  {
    name: 'company',
    fuzzy: 'medium',
    values: [{ name: 'Apple', synonyms: ['Apple', 'Apple Computers', 'Apple Corporation', 'Apple Inc'] }]
  }
]

const extractor = new lists.ListEntityExtractor(listEntities, { engine: 'wasm' })

const results = extractor.extract('I like blueberries and apples')
console.log(results) // 2 of type fruit and 1 of type company

Disclaimer ⚠️

This package is published under the @bpinternal organization. All packages of this organization are meant to be used by the Botpress team internally and are not meant for our community. However, these packages were still left intentionally public for an important reason : We Love Open-Source. Therefore, if you wish to install this package feel absolutly free to do it. We strongly recomand that you tag your versions properly.

The Botpress Engineering team.

0.0.9

1 month ago

0.0.8

2 months ago

0.0.7

2 months ago

0.0.6

3 months ago

0.0.5

6 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

8 months ago

0.0.1

8 months ago