0.0.11 • Published 2 years ago

spoken-pressagio v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

spoken-pressagio / Exports

spoken-pressagio

Basic Usage

Import library

import { Pressagio } from 'spoken-pressagio';

Database will be empty, so you should add data first to create predictions:

await p.parseText('Adding this phrase to the database);

Now you can predict based off of the database data.

let predictions: Prediction = {};

predictions = await p.predict('');

// or

p.predict('Adding this phr')
.then(result => predictions = result);

console.log(predictions);
// Prediction{
//   suggestions: [
//     { word: 'phrase', probability: 1 }
//   ]
// }

Table of contents

Classes

Interfaces

Type Aliases

Variables

Type Aliases

WebSQLResponse

Ƭ WebSQLResponse: SingleNGram[] | SingleNGramCount[] | SingleNGramProbabilities[] | undefined

Defined in

utils/types.ts:69


nGram

Ƭ nGram: { word: string }[]

Defined in

utils/types.ts:59

Variables

pConfig

Const pConfig: PressagioConfig

Defined in

config.ts:3