Home

Awesome

jsRealB - A JavaScript Bilingual Text Realizer for Web Development

Version 5.0 - December 2023

Natural Language Generation (NLG) is a field of artificial intelligence that focuses on the development of systems that produce text for different applications, for example the textual description of massive datasets or the automation of routine text creation.

The web is constantly growing and its content, getting progressively more dynamic, is well-suited to automation by a realizer. However existing realizers are not designed with the web in mind and their integration in a web environment requires much knowledge, complicating their use.

jsRealB is a text realizer designed specifically for the web, easy to learn and to use. This realizer allows its user to build a variety of French and English expressions and sentences, to add HTML tags to them and to easily integrate them into web pages.

jsRealB can also be used in Javascript application by means of a node.js module available also as npm package. It also accepts an input specification in JSON.

The documentation can be accessed here. You can switch between English and French in the upper right corner of the page. The specification of the JSON input format is described here.

The companion project pyrealb implements in Python a text realizer using the same notation for syntactic elements as jsRealB.

jsRealB can be used out of the box (the GitHub in fact!) in a web page by using jsRealB.js in the dist directory.

Caution

Directories

Demos

Simple examples on a single sentence

Linguistic games

Text realization

Data to Text applications

Interactive use with Observable

Licenses

pyrealb source code is licensed under Apache-2.0 and the linguistic resources in the ./data directory is licensed under CC-BY-SA-4.0

Design of the system

Version 3.0 was a redesign and reimplementation of the previous version while keeping intact the external interface, i.e. same name of functions for building constituents, for option names and for global functions. This means that applications using only the external interface of jsRealB can be run unchanged. Version 4.0 added the dependency notation. Version 5.0 reorganized the internal class structure to separate common processing from the language specific aspects for English and French.

More info:

Authors

jsRealB was updated, developed and brought to its current version by Guy Lapalme building on the work of:

  1. Francis Gauthier as part of his summer internship at RALI in 2016;
  2. Paul Molins as part of an internship from INSA Lyon spent at RALI, University of Montreal in 2015;
  3. Nicolas Daoust developed the original concept in the JSreal realizer for French only in 2013.

For more information, contact Guy Lapalme.

Acknowledgement

Thanks to Fabrizio Gotti, François Lareau and Ludan Stoeckle for interesting suggestions.