1.0.1 • Published 4 years ago
@gobo/core v1.0.1
@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()}
,
} -->