github Speech-Rule-Engine/speech-rule-engine v4.0.0-beta.3
Promised Based Processing

latest releases: v4.1.0-beta.10, v4.1.0-beta.8, v4.1.0-beta.9...
2 years ago

Promise based processing

The functionality for loading locales and updating the engine have been refactored to use ES6 promises. This changes the asynchronous behaviour of the engine, which client code will have to take into account.

Changes to the Setup Functions

in particular the changes to the following API method in system.ts:

  • engineReady() returns a Promise that resolves as soon as the engine is ready for processing.
  • setupEngine() is now an asynchronous function that returning a Promise that resolves as soon as the engine is ready for processing.

The engine is considered ready for processing, when all necessary rule files have been loaded for the current locale and the engine is done updating other internals, like the rule indexing structure, the constraint structures, etc.

Changes to File Loading

Other methods that return promises are the file loading methods file.toSpeech, file.toSemantic, ...

Custom Load methods

Adds a custom load methods that can be passed to the feature vector in setupEngine.

Deprecation

Removes deprecated -i option.

Don't miss a new speech-rule-engine release

NewReleases is sending notifications on new releases.