Skip to content

Releases: Speech-Rule-Engine/speech-rule-engine

SRE in Typescript: First Beta

23 Jun 20:59
Compare
Choose a tag to compare

First Beta release of SRE in Typescript. Note, that unlike the alpha, this beta version already contains a number of breaking changes.

Mathmaps

  • Unicode mappings are again in files with a .json.
  • Likewise compile locale mappings are in a single .json file in lib/mathmaps.
  • Sources are now in the top level mathmaps directory.
  • Each locale also contains a messages subdirectory. These contains messages used for generating alphabets, font names etc. Note, that in the combined, minified version of the locale .json, messages always need to come first.

Structure and Build

  • All legacy JavaScript code has been removed.
  • The src file has been removed.
  • The mathmaps subdirectory has been moved to the top level.
  • The Makefile is now exclusively for building the unicode mapping files, one per locale.
  • Building sre is now done with npx tsc; npx webpack

Internal Changes

Changes to data structures, speech rules and code structure.

Simple Speech Rules

Simple speech rules for unicode symbols, functions and units are now handled separately from regular speech rules. That is, the data structure MathSimpleStore no longer inherits from MathStore. While this requires some additional logic for parsing, looking up, and selecting simple rules it reduces the memory footprint of functionality never required by simple rule stores.

Speech Rule Stores

Classes with interface SpeechRuleStore no longer have a trie for indexing speech rules. They are exclusively a container for storing rules together with a common context. Rule look up can only be done via findRule .
In particular stores do no longer provide a lookupRule method that matches rule applicability with respect to a given DOM node.
Rule lookup is not done on tries only.

Speech Rule Engine

The core engine no longer uses a SpeechRuleStore to lookup rules. Previously an active store would have been selected or constructed as a combination of stores, that the store's trie would be use for looking up rules. Now the engine uses a single trie only.

Speech rules are immediately sorted into the trie on load of a locale. While the trie can still be pruned, there is no longer any combining of rule store (into the active store) or reindexing of tries. The rule engine can therefore no longer be furnished with a selection of speech rules stores, only. It will always work with all rules of all locales currently loaded.

Locale Messages

Code for locales that was included in the compiled version has been considerably reduced. Only methods for number string generation and alphabet combinations remain. The latter are often shared between multiple locales. Consequently the growth of the size of sre.js should be small when adding new locales.

Messages for locales have been refactored into three categories, included in a new messages subdirectory and in the locale JSON structures:

  • alphabets: Strings for Greek and Latin alphabets and corresponding prefixes.
  • messages: Messages for MathSpeak, fonts, embellishments, roles, etc.
  • numbers: Strings necessary for generating numbers.

Future changes

The next step will be the devolution of preconditions of speech rules from their actions. That is common preconditions for speech rules will be stored in and loaded from a "base locale", while proper locales will only contain the respective actions.

Hindi Patch Release

11 Jun 09:33
Compare
Choose a tag to compare

Note that v3.3.2 is faulty and deprecated

Patch release with fixes and updates. It contains minimal code changes that need to be ported manually to v4.

Hindi locale

Improvements on

  • number of symbols and character translations
  • clearspeak rules for matrices and tables
  • prefix and summary rules

MathJax compatibility for upcoming 3.2

  • Smart preferences

Bug fixes

  • Firefox explorer bug due to changes in Firefox's handling of XML documents.

SRE in Typescript: First Alpha

19 May 18:20
Compare
Choose a tag to compare
Pre-release

Hot fix for the mathmaps lookup that fails in v4.0.0-alpha.0.

SRE in Typescript: First Alpha

19 May 13:31
Compare
Choose a tag to compare
Pre-release

Alpha test version of SRE converted to Typescript.

This version can only be tested successfully against the v4 branch in
https://github.com/Speech-Rule-Engine/sre-tests

Hindi Localisation

19 May 23:29
Compare
Choose a tag to compare

Hindi Localisation

First non-Latin alphabet localisation made possible thanks a Sparc UKIERI project.

Other things

  • Some improvements to span handling in Clearspeak rules for SSML_STEP renderer.
  • Nemeth bug fix

Deprecation warning

  • With the v3.3.0 release we have deprecated direct support for Internet Explorer mappings in the SRE release. There is still a dedicated npm repository for the IE mappings file. Note that this repo will be discontinued in the future

v3.3.0

  • Note that v3.3.0 encountered a problem during publication and is therefore deprecated!

v3.3.0-beta.0

27 Apr 15:46
Compare
Choose a tag to compare

First beta for the Hindi Localisation (thanks a Sparc UKIERI project).

Deprecation warning

  • With the v3.3.0 release we will deprecate direct support for Internet Explorer mappings in the SRE release. There will still be a dedicated npm repository for the IE mappings file.

Italian Localisation, Dynamic Speech Rule Loading, Nemeth Improvements

19 Apr 02:42
3e7aa74
Compare
Choose a tag to compare

Italian Localisation

Includes full Italian localisation of both MathSpeak and ClearSpeak rule sets, thanks to financial support by TextHelp.

Partial overhaul of the speech rule system.

A full overhaul of the speech rules will happen after SRE has moved to TypeScript.

General Improvements

  • Reduces as much as possible disjunctive preconditions. Handling this via the indexing structure speeds up processing.
  • New and improved heuristics for: scripts and accents, juxtaposition handling, named and simple function handling
  • Gets rid of some oddities in the MathSpeak rule sets for English:
    • overtilde, undertilde, overbar, underbar
    • integral is now handled similar to sum and other big operators.
  • Additions to ClearSpeak for handling of crossed out and enclosed expressions

Dynamic loading of speech rules

  • Speech rule sets are now loaded dynamically together with the locale translations of unicode characters
  • Ensure to wait for rules being loaded using engineReady
  • Adds options to load local rule sets and prune the rule trie:
    * file, prune parameters can be passed to CLI and browser library.

Nemeth Improvements

This work was sponsored by the American Action Fund.

  • Improvements to the Nemeth translation
    • English characters with fonts
    • Literal translation of functions and units
  • Many fixes from our PreTeXt project thanks to Michael Cantino
  • Flexible loading of specially transcribed symbols

Semantic Improvements

  • Clean separation of selectable semantic heuristics
  • New heuristics released into the wild: complex juxtaposition, multioperator combination, prefix function detection
  • Explicit treatment of large spacing
  • Recognition of mglyph elements
  • Surfacing of links and glyphs as images

Removes caching

Caching of computed speech has been fully removed. From v1.0.0 to v3.1.1 SRE used caching of speech recursively computed that could be reused when speech is generated recursively. This feature is rarely used in practice,

Moreover it was error prone and in the way of future plans to employ more parallelisation.

Note: During recursively enriching large expressions with speech strings (option speech: deep) there can be some

Experiments with large data sets have shown that while there is some slow down of processing it is linear by a factor of at most 2. However, should you see a more significant slow down, please file an issue.

Regression bug fixes

09 Apr 19:13
Compare
Choose a tag to compare
  • Regression bug fixes
  • Some Nemeth updates

3.2.0-beta.3

28 Mar 00:56
Compare
Choose a tag to compare
  • Overhaul of Nemeth Rules
  • Treatment of interesting spaces
  • Bug fixes

Cache removal

26 Feb 20:23
Compare
Choose a tag to compare
  • First release where the cache is removed.
  • Fixes a number of issues.