@gobo/core

1.0.1 • Public • Published

@gobo/core

Core functions for Gobo Conversational AI.

Installation

npm i @gobo/core

Usage

Normalize a text:

const { normalize } = require('@gobo/core');
console.log(normalize('àñÍS'));
// anis

Tokenize a text:

const { tokenize } = require('@gobo/core');
console.log(tokenize('this Should,  , be.splitted'));
// ['this', 'Should', 'be', 'splitted']

Stem a text: this is a mock, so it returns exactly the input.

const { stem } = require('@gobo/core');
console.log(stem(['this', 'should', 'be', 'stemmed']));
// ['this', 'should', 'be', 'stemmed']

Generate an uuid: for compatibility with browsers.

const { uuid } = require('@gobo/core');
console.log(uuid());
// 1e74bd9c-1cf6-14b6-0452-aee99ba87dab

uuid: () => ${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4()}${s4()}${s4()}, } -->

Readme

Keywords

none

Package Sidebar

Install

npm i @gobo/core

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

5.11 kB

Total Files

6

Last publish

Collaborators

  • jesus-seijas
  • jseijas