Change log of RosaeNLG

This is the documentation for 3.0.2 version, which is not the latest version. Consider upgrading to 4.3.0.

[3.0.2] - 2021-10-19

Fixed

  • curl example is fixed

  • checking asm mode for 'paragraph' before throwing a paragraph error

[3.0.1] - 2021-07-25

Added

  • pug_mixins documentation

Fixed

  • tok var definition fix in tag function (thanks Mathias Winckel)

  • added the exception 'cama' (Spanish gender)

[3.0.0] - 2021-05-06

It is a major version because there are breaking changes.

Added

  • you may use RosaeNLG without using templates, accessing directly the low level JavaScript API; support is experimental. See Usage without Pug templates

  • there are now some "universal tenses" defined, which work for multiple languages; see Universal tenses table

Changed

There are 3 breaking changes that affect existing templates.

ref and refexpr must be reference to mixins

ref and refexpr must now be reference to mixins (and no more strings), and they must be referenced after being declared.

Table 1. Change on ref and refexpr
Before
- var PRODUCT = {};
- PRODUCT.ref = 'PRODUCT_ref';
mixin PRODUCT_ref(obj, params)

the ring …​.

After

- var PRODUCT = {};
mixin PRODUCT_ref(obj, params)

the ring - PRODUCT.ref = PRODUCT_ref; …​.

Your templates will probably fail at runtime if you don’t change them. To migrate:

  • search for .ref and .refexpr in your templates

  • put references instead of strings

  • move them after the referenced mixin declaration

when referencing a mixin, assembly separators properties must not use a string

Assembly separators (last_separator, begin_with_general, etc.) can either be a string or reference a mixin. When referencing a mixin, you must now put the mixin as a reference (no more as a string), and the mixin must have been defined before.

If you don’t migrate, your templates will not fail, but the text will be wrong: you will have the mixin name in the output.

To migrate, search for all assemblies (eachz and itemz) and change their properties if they reference mixins.

mixins and objects cannot have the same name

Mixins are now functions, which have a name; you cannot have mixins and objects having the same name, e.g.

mixin phone
  | bla bla
- var phone = {};

is now invalid.

Your templates will probably fail at runtime if you don’t change them. Rename conflicting mixins or objects.

[2.1.9] - 2021-04-13

Fixed

  • sonar code smells

  • light refactoring

[2.1.8] - 2021-03-30

Added

  • LF AI & Data branding

  • example showcases of the linguistic mechanisms implemented in RosaeNLG:

Fixed

  • manages gender for ordinals in French: première and 1re

  • restaus plural exception in French

  • some English exceptions: an armlet (not a armlet)

  • English conjugations corrected: married (not marryed!), disagreed (not disagreeed!)

  • sonar "code smells" (some of it)

Changed

  • clearer license info in README.md

[2.1.7] - 2021-03-08

Fixed

  • \#57 highlight js works again, reduced list of supported languages by highlight, and tried to remove favicon requests

  • \#58 gerund of 'to be' is 'being', not 'bing'

  • \#55 'to be' formally added to the list of irregular verbs in english-verbs-irregular (though is not not used to conjugate 'to be', as it is an auxiliary)

  • issues on Lambda version deployment

[2.1.6] - 2021-03-07

Fixed

  • some security warnings by updating libraries versions

Changed

  • license for documentation files is now CC-BY-4.0

[2.1.5] - 2021-02-20

Fixed

  • with a fixed random seed, output was not the same whether renderDebug was activated or not

  • in French, si il becomes s’il (as well as si ils which becomes s’ils, but there is no other case)

[2.1.4] - 2021-01-30

Fixed

  • bug \#47: dates were not properly protected

[2.1.3] - 2021-01-17

Added

  • configuration and doc for Vercel pkg to generate an .exe file for the server

  • governance in GOVERNANCE.md

Fixed

  • .npmignore cleanup

  • wrong schema to test input in Lambda

  • some dependencies update

[2.1.2] - 2020-12-29

Added

  • Italian contractions implemented: di ildel, su lasulla

  • pug lint of yeoman boilerplate project

  • some more exceptions on French plurals

Changed

  • in French, support of de vs des when having an adjective: de bons restaurants

  • specific French plurals module rosaenlg-pluralize-fr forked from pluralize-fr

[2.1.1] - 2020-12-26

Added

  • yeoman generator to easily bootstrap RosaeNLG projects

  • patreon funding link: https://www.patreon.com/ludan

  • in API, randomSeed is now automatically present in the output

Changed

[2.1.0] - 2020-12-10

Added

  • new parameter renderDebug to follow the rendering path in the html output; see new debugging manual

  • performance monitoring in the CI

Fixed

  • \#26: valueToSorP(val) was naive; now rules are language specific (in English 0 degrees, while in French 0 degré)

Changed

  • antora-ui, antora-playbook and docs-site, which were used to manage documentation publication using Antora, are now in main monorepo; old separate repos are archived

[2.0.0] - 2020-11-29

moment, which was used to format dates, was replaced by date-fns, essentially to reduce the size of render only browser bundled packages.

You must update dateFormat everywhere you used it following date-fns format.

Also, util.moment not available no more. If you used it, alternatives are:

  • import moment in your node project and inject moment yourself in util

  • or prepare dates upstream from generating texts (and avoid moment in templates)

Added

  • issue templates on GitHub

  • standard guides: README.md, DEVELOPER_GUIDE.md, CONTRIBUTING.md, COMMUNITY.md etc.

  • Observable HQ integration doc

  • doc on synonyms explaining best approach to generate all alternatives

Fixed

Changed

  • render only browser packages are smaller (about 1/3 gain).

  • date-fns is now used to format dates instead of moment.

  • util.moment not available no more.

  • n2words is packaged more finely to reduce package size.

[1.20.2] - 2020-11-19

Fixed

  • same as 1.20.1, but as Java version failed I need a new version number

[1.20.1] - 2020-11-19

Fixed

  • sonar warnings

[1.20.0] - 2020-11-13

Added

  • developer doc to add new languages

Changed

  • new organisation of language specific rules: per language classes vs switch/case everywhere, which will ease the addition of new languages

[1.19.0] - 2020-11-02

Added

  • Java version now supports ouputData

Fixed

  • updated Java version:

    • outdated dependencies update

    • updated JSON RosaeNLG package format, now same as node.js version (sources in src)

  • sonar alerts

[1.18.1] - 2020-10-31

Changed

  • github migration:

    • all project repositories moved to github, including documentation related subprojects (antora-ui, antora-playbook, docs-site, boilerplate): see RosaeNLG organization on Github

    • dictionary.zip storage for german-pos-dict instead of dictionary.dump, which was too large for github

    • github worklows generated using gulp workflows

  • docker registry moved from registry.gitlab.com to hub.docker.com for cli, node.js server images and java server images

[1.18.0] - 2020-10-23

Fixed

  • security update of dependencies

Changed

  • license change to Apache 2.0:

    • most original packages switch to Apache 2.0 license

    • packages derived from original Pug packages rosaenlg-pug-…​ remain under MIT

    • other packages that are forks from MIT packages remain under MIT as well: english-ordinals, rosaenlg-gender-es, rosaenlg-pluralize-es

  • documentation in separate module rosaenlg-doc

  • updated logo (font is Soft Elegance)

[1.17.2] - 2020-10-14

Added

  • code of conduct

Fixed

  • bug in browser version of rosaenlg-packager

[1.17.1] - 2020-09-25

Changed

  • dependencies update (quite a lot of them)

[1.17.0] - 2020-08-18

Added

  • getHasSaidCopy returns a copy of the hasSaid / recordSaid map as an object

  • in the API (lambda and node): added a outputData field so that specific computed data can be output by the API, and not only text

Changed

  • dependencies update

[1.16.10] - 2020-08-17

Added

  • ability to complete or override default words and adjective lists in all languages

Fixed

  • German dative definite article was wrong: denen instead of den

[1.16.9] - 2020-07-21

Added

  • ROSAENLG_SHARED_DIR on node API to put shared templates in a separate folder

[1.16.8] - 2020-07-20

Changed

  • fixes 1.16.7 for DEFAULT_USER

[1.16.7] - 2020-07-20

Added

  • in node API, when not using JWT, it is now possible to indicate which header contains the user

[1.16.6] - 2020-07-17

Added

  • thanks to HB feedback: in English, new key useTheWhenPlural to output the when definite article in plural: #[+value('machine', {det:'DEFINITE', number:'P', useTheWhenPlural: true})] will output the machines

Fixed

  • thanks to HB feedback: #[+subjectVerbAdj('machine', 'être', 'prêt', {det:'DEFINITE', number:'P'})] now produces les machines sont prêtes (instead of les machines est prêtes)

[1.16.5] - 2020-07-15

Added

  • JSON schema is now enforced on input for Lambda API

Fixed

  • stopword list was broken in the documentation

  • some errors in the swagger

  • larger timeout for lambda functions

[1.16.4] - 2020-07-06

Added

  • countries library, for English and French

[1.16.3] - 2020-07-04

Fixed

  • replaces 1.16.2 which had a little too much agressive contraction mechanism in French; always use 1.16.3 instead of 1.16.2.

[1.16.2] - 2020-07-04

Added

  • in rosaenlg-packager, expandPackagedTemplateJson will transform a JSON packaged project into plain separate files

  • in swagger, added custom generic field

Fixed

  • date contraction issues: de #[+value(new Date('1980-04-14'), {dateFormat:"MMMM"})] did output de avril instead of d’avril (in French)

Changed

  • security update of dependencies

[1.16.1] - 2020-06-24

Added

  • node API and Lambda API: ability to set a user who has shared templates, which can be rendered by anyone

    • see ROSAENLG_SHARED_USER for node version

    • see sharedUser configuration for Lambda

  • node API and Lambda API: render now also gives templateSha1 in the result

[1.16.0] - 2020-06-12

Added

  • on both node.js and Lambda API:

    • /templates/version to get the current RosaeNLG version deployed

    • accepts JWT token for authorisation

Fixed

  • in the prediction, corrected bug on empty element detection

  • Lambda API:

    • added x-rapidapi-proxy-secret and x-rapidapi-user in Access-Control-Allow-Headers for preflight CORS

    • now supports headers both in upper and lower case

  • node.js API: CORS support

Changed

  • on the node.js API, reload is removed; now just using /templates/{templateId} will always try to reload and give the last SHA1 in the response

  • on both node.js and Lambda API, /templates/{templateId} will now systematically read on backend (and not use cache)

[1.15.4] - 2020-05-29

Added

  • migration scripts in server-scripts folder

Changed

  • when rendering, in both node and lamba API: if the proper template/SHA1 is not in the cache but is found on backend, with a different SHA1: you now get a 308 redirect instead of an error (error was sha1 do not correspond, read sha1 is …​ while requested is …​)

[1.15.3] - 2020-05-16

Added

  • French: in revamped module french-contractions:

    • larger list of "H Aspiré" words

    • exceptions for other words: cet arbre vs ce yahourt, le iota vs l’iode

[1.15.2] - 2020-05-14

Fixed

  • clearer exception when value of something that is null or undefined

[1.15.1] - 2020-05-08

Added

  • numerous tags now accept lists parameters instead of a single element, and will choose one randomly; use that feature instead of an embedded syn_fct call:

    • agreeAdj and subjectVerbAdj now accept a list of adjectives

    • value accepts a list of elements as first parameter

    • verb, subjectVerb and subjectVerbAdj as well for the subject

    • verb, subjectVerb and subjectVerbAdj as well for the verb

  • noSubject flag on subjectVerb and subjectVerbAdj mixins to silent the subject

Fixed

  • verbs and adjectives are now properly extracted from subjectVerbAdj mixin, when embedding resources

  • there were sometimes inopportune ¤ in the html tags

  • there were spacing issues when parenthesis and quotes where mixed, like in bla ("bla") bla

[1.15.0] - 2020-05-05

Added

  • Spanish support: verbs, words (gender, plural), adjectives, determiners

  • SEP_BEFORE and SEP_AFTER to provide separators when multiple adjectives; is practical to override default, e.g. value('árbol', { det:'DEFINITE', adj:{BEFORE:['primero', 'grande'], SEP_BEFORE:''} }) will generate el primer gran árbol

Fixed

  • bug in BEFORE adjective list: value('homme', {det:'INDEFINITE', adj: { BEFORE:['vieux'] } }) now produces un vieil homme

  • bug in Lambda functions: forced embedded resources (in compile options) were ignored

  • bug in browser-ide-demo: JSON export was wrong (templateId in src and not a top level element)

  • bug in french-adjectives when adjective was placed before noun and plural: generated vieil alsaciens instead of vieux alsaciens

Changed

  • removed substantive mixin: use value instead with number param, see Value for Nominal Groups

  • english-ordinals is now a separate module

  • pluralize-fr removed from tiny runtime (automatically embeds a list of words with their plural instead)

  • french-adjectives is not embedded no more in tiny version (using lists instead)

  • doc organization for verb and value mixins

[1.14.3] - 2020-04-18

Changed

  • plugged to sonarqube, and thus some code style fixes

  • browser-ide-demo:

    • warning when load example while code has changed

    • auto render by default

[1.14.2] - 2020-04-11

Changed

  • browser-ide-demo

    • added sidebar

    • now based on a clean Vue project

[1.14.1] - 2020-04-06

Added

  • in browser-ide-demo, save to compiled JavaScript with export option

[1.14.0] - 2020-04-05

Fixed

  • fixed lambda create which did not save on S3 when the input already contained the compiled content

Changed

  • many changes in gulp-rosaenlg:

    • renamed to rosaenlg-packager

    • removed renderTemplateInFile whose added value was poor

    • packageTemplateJson changed to completePackagedTemplateJson, with a different signature

    • compileTemplates changed to compileTemplateToJsString, with a different signature

[1.13.0] - 2020-03-29

Added

Fixed

  • clearer exception and message when some raw js in the template is not properly compiled

Changed

  • gulp-rosaenlg now automatically includes all files to be included by reading the templates content

  • as a consequence, in the packageTemplateJson function:

    • folderWithTemplates is removed

    • entryTemplate must now also contain the path

[1.12.3] - 2020-03-27

Changed

  • dependencies update

  • removed sha1 external lib in favor of integrated crypto

[1.12.2] - 2020-03-18

Changed

  • dependencies update

[1.12.1] - 2020-03-16

Added

Fixed

  • rosaenlg-node-server issue in docker image

Changed

  • deprecated content-deduplicate and removed it from the repo

[1.12.0] - 2020-03-16

Added

  • (almost) ready to deploy Lambda functions for AWS

  • common content for rosaenlg-node-server and rosaenlg-lambda in separate package rosaenlg-server-toolkit

  • tested (successfully) on different Node.js versions, see here

Fixed

  • in pure rendering packages, essential libs were missing: numeral for all languages and french-adjectives for French, since 1.8.0

Changed

  • deprecated content-deduplicate

[1.11.0] - 2020-02-29

Added

  • bullet lists for itemz and eachz, see doc

  • dynamic assemblies depending on the real length of non empty elements, also see doc

Fixed

  • h1 h2 etc. were not considered as block level html elements

[1.10.2] - 2020-02-26

Added

  • (much) better Italian ordinal support (up to 1 millions) thanks to Marco Riva

  • in value, use agree for ORDINAL_TEXTUAL in it_IT to have prima and not primo

[1.10.1] - 2020-02-18

Fixed

  • rosaenlg-node-server: forgot to update docker tests

[1.10.0] - 2020-02-18

Added

  • getRosaeNlgVersion() returns the version of RosaeNLG

  • rosaenlg-node-server: pre compiled templates are now accepted; when uploaded, templates are compiled only once and saved

Fixed

  • rosaenlg-node-server: templates with include in subfolders had issues when importing

Changed

  • changed JSON packaging format, now separates src and comp fields

[1.9.2] - 2020-02-15

Fixed

  • was able to analyze browser packages thanks to rollup-plugin-analyzer: removed a lot of unuseful stuff (particularly for rendering only packages)

[1.9.1] - 2020-02-14

Fixed

  • big bug when choosebest was in an itemz structure; error message was choosebest cannot be imbricated

  • removed 2 patches thanks to n2words 1.3.2

[1.9.0] - 2020-02-10

Changed

  • more reliable a / an filtering in English: use of english-a-an and english-a-an-list instead of compromise in rosaenlg-filter

  • more reliable Englisn plurals: use of english-plurals and english-plurals-list instead of compromise

  • now using n2words for textual numbers in all languages, replacing written-number for French, write-int for German, compromise for English and italian-ordinals-cardinals for Italian textual

  • replaced compromise by n2words + custom code inspired by number-to-words for English ordinal numbers

  • completely removed compromise lib

[1.8.3] - 2020-02-06

Added

  • added rosaenlg-parallel-poc in the repo to ease maintenance

  • added rosaenlg-browser-poc in the repo to ease maintenance

[1.8.2] - 2020-02-05

Fixed

  • naming collisions on english-verbs on npm, renamed english-verbs-helper

[1.8.1] - 2020-02-05

Added

  • en_US:

    • for verbs, replaced comprise lib with english-verbs, english-verbs-irregular and english-verbs-gerunds

    • 12 standard tenses are now available: SIMPLE_PAST, SIMPLE_PRESENT, SIMPLE_FUTURE, PROGRESSIVE_PAST, PROGRESSIVE_PRESENT, PROGRESSIVE_FUTURE, PERFECT_PAST, PERFECT_PRESENT, PERFECT_FUTURE, PERFECT_PROGRESSIVE_PAST, PERFECT_PROGRESSIVE_PRESENT, PERFECT_PROGRESSIVE_FUTURE

[1.8.0] - 2020-02-02

Added

  • Italian and Other now available on browser IDE

Changed

  • use rollup.js to package (instead of browserify):

    • (somewhat) smaller packages: now around 250kb for rendering

    • (somewhat) faster build: build_the_code on CI used to last 26 minutes, now 18 minutes

  • removed rosaenlg-pug-filters: brought few features and many security issues

[1.7.1] - 2020-01-23

Added

  • package button in browser-ide

  • Rapid API documentation

  • mirror docker node.js server image on aws ecr

Fixed

  • rosaenlg-node-server will now return a 404 on render when the template exists but the sha1 is not good

Changed

  • dependancies update

[1.7.0] - 2020-01-20

Added

  • rosaenlg-node-server is now more ready to use on a cluster:

    • ROSAENLG_LAZY_STARTUP: env variable, if set it prevents loading saved templates at startup (they will be loaded when needed only)

    • ROSAENLG_FORGET_TEMPLATES: env variable, if set to true loaded templates will be forgotten after a while (and reloaded when needed)

Changed

  • rosaenlg-node-server: lots of changes in the API, especially sha1 of the template is required to render a template (you get the sha1 when you load the template)

[1.6.2] - 2020-01-12

Added

  • rosaenlg-node-server:

    • better structured JSON logs

    • logs using AWS CloudWatch; see doc for config

Changed

  • rosaenlg-node-server:

    • env variable AWS_ACCESS_KEY_ID becomes AWS_S3_ACCESS_KEY_ID

    • env variable AWS_SECRET_ACCESS_KEY becomes AWS_S3_SECRET_ACCESS_KEY

[1.6.1] - 2020-01-11

Fixed

  • do not use 1.6.0 as there was an issue in rosaenlg-node-server: winston must not be devDependancy

[1.6.0] - 2020-01-11

Added

  • rosaenlg-node-server:

    • S3 support for persistence

    • ability to put a user in the request, and have separate environments

    • /health path

    • time elapsed (performance) in the response and in the logging

    • static swagger published here

Fixed

  • rosaenlg-node-server:

    • more standard logging using winston

    • rewrote all sync to async

Changed

  • rosaenlg-node-server:

    • use get on /templates/:templateId instead of /templates/:templateId/template to get template content

    • reload all using /templates/reload is removed (reload individually each template, or just restart the server)

[1.5.8] - 2020-01-06

Fixed

  • rosaenlg-node-server: when using persistent templates, templates were not reloaded when server was restarted

Changed

[1.5.7] - 2020-01-05

Changed

  • removed snyk dependancy

[1.5.6] - 2019-12-14

1.5.5 was not a really good version - please favor 1.5.6 instead.

Fixed

  • quotes ("…​") are now properly managed in terms of spacing

Changed

  • removed filter mixin: everything is filtered by default; use protect mixin to protect sections you don’t want to filter

  • removed disableFiltering option

[1.5.5] - 2019-12-13

Added

  • in rosaenlg-node-server: ability to render a template directly, by sending the template and the data in the same request

Fixed

  • the "missing space" issue, which lead to add lines with just | or | #{''}, is fixed (which is indeed a very good thing)

Changed

  • §…​§ structure is deprecated: please use protect tag instead which better cares for spacing

  • in rosaenlg-node-server: removed counter in the response (didn’t work properly, and was not really interesting)

[1.5.4] - 2019-12-04

Added

  • new additional independant module content-deduplicate; it is not used by RosaeNLG while rendering texts but you can use it afterwards to assess the quality of your texts

Changed

  • in synonym global optimisation: html tags div p etc. are not considered no more as words; this can bring regressions on your projects, as synonyms are better chosen

  • French is better tokenized when there are apostrophes in the text

Fixed

  • dependancies update

[1.5.3] - 2019-11-24

Added

  • list of standard stop words in the documentation

  • Developer experience documentation

  • with CLI, templates can now be rendered in stdout (not systematically in a file)

  • compare with xSpin

  • examples of templates showing the added value of a Natural Language Generator compared to a plain template engine like Pug

Fixed

  • itemz and eachz can be used with parameters: default will be {}

Changed

  • rosaenlg-cli used to output in files by default; now by default it outputs in stdout; add --out=./ to output in files as before

[1.5.2] - 2019-11-18

Changed

  • docker images (command line interface and server) are not built through main CI and available here

  • browser-ide-demo is now a package of the project

[1.5.1] - 2019-11-16

Fixed

  • rosaenlg-node-server was not able to find openApiDocumentation_merged.json as path was not relative

[1.5.0] - 2019-11-16

Added

Changed

  • rosaengl-cli (the command line interface):

    • is now in the main repo

    • updated dependancies on rosaengl-cli

  • rosaengl-node-server (server based on RosaeNLG):

    • is now in the main repo

    • logs in rosaengl-node-server

Fixed

  • removed @types/random-js dependancy which made a warning

Changed

[1.4.1] - 2019-11-15

Added

  • NlgLib is now exposed. Useful when using compileFile (e.g. import {compileFile, NlgLib} from 'rosaenlg'),and mandatory for rosaenlg-node-server.

Changed

  • update of many dependancies

[1.4.0] - 2019-11-07

Changed

  • large reorganization of the documentation

Added

  • more doc on how to integrate, Java Wrapper, Java Server etc.

[1.3.3] - 2019-10-29

Fixed

  • #[+value('some string')] didn’t work no more

[1.3.2] - 2019-10-27

Added

  • in the browser files supporting compilation (_comp.js), there was only the render function; added compile, compileFile, compileClient, compileFileClient, renderFile and an access to NlgLib

  • in gulp-rosaenlg, packageTemplateJson to bundle templates and included templates in a single Json file

Changed

  • removed 'fat js' version (was huge, long to produce & not really useful)

[1.3.1] - 2019-10-18

Fixed

  • fat js is still as fat but at least works now.

[1.3.0] - 2019-10-13

Added

  • fat js packaged version, with compilation ability on each language, to be used in GraalVM

[1.2.0] - 2019-10-12

Added

  • recordSaid hasSaid and deleteSaid existed to safely record booleans; now there is recordValue getValue and deleteValue to safely record numbers or strings

  • compare with CoreNLG in the documentation

[1.1.1] - 2019-10-09

Added

  • GraalVM runtime documentation

Fixed

  • Dev dependancies security issues thanks to Snyk

  • More French contractions (j’ai, lorsqu’il, puisqu’elle, jusqu’à etc.) thanks to CoreNLG source code

Changed

[1.1.0] - 2019-10-07

Added

  • new synonym mode once: will trigger each alternative randomly, but will try to trigger each one only once. Just use it instead of random!

[1.0.5] - 2019-09-29

Fixed

  • README.md is back for npmjs.com

  • in French, on browser package, composed tenses raised an error, because verbs that always take ETRE aux were not correctly packaged

[1.0.4] - 2019-09-29

Changed

  • reduced size on npm thanks to .npmignore

[1.0.3] - 2019-09-29

Added

  • when using subjectVerb in French, when aux is ETRE, the participle is automatically agreed with the subject

[1.0.2] - 2019-09-12

Fixed

  • 1.0.1 broke gulp-rosaenlg. Removed more deeply dependancy with uglify (which was used by Pug pre-RosaeNLG).

[1.0.1] - 2019-09-12

Fixed

  • Browser compilation was broken. Fix + added automated tests.

[1.0.0] - 2019-09-10

Added

  • search engine available in RosaeNLG doc thanks to Algolia DocSearch (awesome product and support btw)

Fixed

  • outdated packages (yarn outdated) replaced by newer version

Changed

  • 1.0.0 version at last!

[0.18.10] - 2019-09-07

  • doc update

  • search engine in the doc (thanks to Algolia)

[0.18.9] - 2019-09-05

Changed

  • new logo

[0.18.8] - 2019-09-05

Changed

  • open-source publication

[0.18.7]

Changed

  • nothing as it did never exist

[0.18.6]

Changed

  • nothing as it did never exist

[0.18.5] - 2019-08-27 (private version)

Fixed

  • security fixes: 0 vulnerabilities found - Packages audited: 57380

    • updated gulp-pegjs version

    • new version of libs

[0.18.4] - 2019-08-27 (private version)

Changed

  • style for == and !=

  • usage of recast to parse js expressions when checking for linguistic resources

[0.18.3] - 2019-08-02 (private version)

Fixed

  • much better support of html when filtering

  • removed (some) deprecated libs

[0.18.2] - 2019-07-27 (private version)

Added

  • compare with CoreNLG (to be enriched with the feedback of the CoreNLG team!)

Fixed

  • proper capitalization and spacing when mixin with html bold or italic

Changed

  • removed sqlite dependancy (because it was hard to build & not really useful)

[0.18.1] - 2019-07-12 (private version)

Added

  • adj in value mixin accepts more: can be a list adj:['beau', 'grand'], or an object adj:{ BEFORE: ['beau', 'intelligent'], AFTER: ['brun'] }

  • DEMONSTRATIVE determiner type in Italian

  • possessive adjective param in value possessiveAdj for Italian possessives

  • boilerplate documentation see boilerplate project

Changed

  • renamed for freenlg to rosaenlg

[0.18.0] - 2019-07-12 (private version)

Added

  • Indefinite articles in German simplified syntax <…​> parsing

  • Italian verbs

Fixed

  • French past participles used as adjectives

  • Italian past participles and present participles used as adjectives

  • German present participles used as adjectives

  • better Yseop templates generation

[0.17.0] - 2019-06-29 (private version)

Added

  • first support of Italian (no verbs)

  • basic support on any language

  • INDEFINITE determiner type in German

Changed

  • Non-breaking space in French punctuation (before : ! ; and ?)

[0.16.0] - 2019-05-11 (private version)

Fixed

  • de #[+value(9000)] (or any number) would contract into d'9 000. Now generates de 9000 properly.

  • Punctuation on French and English when using ? or !.

  • French possessives issues.

Added

  • Added dates formatting thanks to moment lib

  • Filtering can be explicitely disabled with disableFiltering: true in renderFile

  • Numbers formatting: use FORMAT in value to set a format directly used by numeral. See numeral.js formats. Very practical for currencies, %, etc. For instance +value(104000, {'FORMAT': '0a$'}) will output 104k€ when generating French.

  • det to add a determiner (French and German); current determiners are DEFINITE and DEMONSTRATIVE.

  • It is now easier to complete the params object with new values with addToParams: addToParams({xxx:yyy}) is equivalent to Object.assign({}, params, {xxx:yyy}.

  • adj property in value to add an adjective.

  • owner property in value to manage possessives. Does the same thing as thirdPossession.

  • recordSaid and deleteSaid do not need a `- ` before them no more.

  • Ability to globally choose the best synonymic alternatives with choosebest: see [choosebest].

  • Ability to compile and/or just render texts in browser, without using node.js. See [inbrowser].

  • Tutoriels can be run directly in the browser.

  • Improved French support, see below.

  • Partial support of German (de_DE), see below.

  • Ability to generate Yseop templates. Yseop is a NLG software vendor. See [yseop.adoc].

French

  • Cardinal numbers in letters (5 → cinq etc.) support thanks to written-number lib

  • Numbers formatting:

    • Basic support for French ordinal numbers: +value(1, {'ORDINAL_NUMBER':true }) = 1er thanks to numeral lib

    • Support for French cardinal numbers up to 100: +value(21, {'ORDINAL_TEXTUAL':true }) = vingt et unième

  • Improved French verbs support:

    • Any verb of all 3 verb groups are available thanks to lefff derived resource.

    • Supported tenses: PRESENT FUTUR IMPARFAIT PASSE_SIMPLE CONDITIONNEL_PRESENT IMPERATIF_PRESENT SUBJONCTIF_PRESENT SUBJONCTIF_IMPARFAIT PASSE_COMPOSE PLUS_QUE_PARFAIT.

    • For PASSE_COMPOSE and PLUS_QUE_PARFAIT: use aux property (ETRE or AVOIR) and agree property: elles #[+verb(getAnonFP(), {verb: 'sortir', tense:'PASSE_COMPOSE', aux:'ETRE', agree: getAnonFP()})] generates elles sont sorties. If aux is not set, some rules will apply (transitive verbs rather take AVOIR, etc.).

    • Use pronominal:true for pronominal form.

  • French gender shortcuts:

    • setRefGender(PRODUCT, 'bague'); will look for bague in the dictionnary and set PRODUCT gender to F.

    • #[+value('bague', {represents: PRODUIT})] will output bague and set the gender of PRODUIT to F via the dictionnary.

  • French contractions:

    • now manage ce/cet: ce arbre becomes cet arbre

    • manages "h aspiré": le hérisson vs l’hebdomadaire

  • French adjectives:

    • adjPos in value to set the position of the adjective

    • manages "h aspiré":

      • #[+value('homme', {det:'INDEFINITE', adj:'vieux', adjPos:'BEFORE'})] outputs un vieil homme

      • #[+value('hollandais', {det:'INDEFINITE', adj:'vieux', adjPos:'BEFORE'})] outputs un vieil hollandais

  • Very simple integrated POS tagger-like to simplify syntax: [+value('<un vieil hollandais>')] (or [+value('<une vieux hollandais>')]) outputs un vieil hollandais. See value.adoc#simplified.

German

  • German is de_DE.

  • Ponctuation (like English).

  • Dates and numbers.

  • Gender of words (M/F/N) thanks to german-pos-dict.

  • Cases thanks to german-pos-dict.

  • Determiners.

  • getMFN helper (makes the same job than getMorF).

  • Possessives (die Farbe der Gurke).

  • Adjectives (der alten Gurke).

  • Very simple integrated POS tagger-like to simplify syntax: #[+value("<der alte Gurke>", {case:'GENITIVE'})] outputs der alten Gurke. See value.adoc#simplified.

  • Verbs thanks to german-pos-dict - all tenses are supported

English

  • determiners and possessives (thirdPossession)

Changed

  • Some speed optimizations (which are not significant)

  • Refactoring: switched to TypeScript for most of the code

  • Some renaming: please impact your templates

    • shuffle renamed to mix

    • REPRESENTANT: 'ana' renamed to REPRESENTANT: 'refexpr'

  • Updated librairies and linguistic resources documentation: see index.adoc#resources

  • Replaced better-title-case, which was deprecated on npm, by better-title-case. Changed the test case (titlecase rules seem to be complex).

  • monthName(date) (which generated the name of the month january february etc.) is deprecated as we now have moment lib. Use #[+value(date, 'MMMM')] instead.

  • Removed format-number-french (replaced by numeral).

  • Removed jslingua (replaced by custom lefff extract).

  • valWithUnit is deprecated and removed.

  • loadDict param is removed; ressources a just loaded when necessary.

  • Removed registerSubst. Use setRefGenderNumber directly.

  • updated many libs: copyfiles mocha rimraf better-sqlite3 compromise moment written-number

[0.15.6] - 2018-04-21

Fixed

  • no changes - just fixin Lerna

[0.15.5] - 2018-04-21

Added

  • performance documentation

Fixed

  • Sub modules are now referenced via their exact version number (no more ^…​). It will be easier to use fixed versions of RosaeNLG (with their dependencies) in the future.

[0.15.4] - 2018-04-20

Fixed

  • French support for month names did not work - fixed

  • getNextRep (used in French) didn’t work properly: the chosen representant was often not the one that getNextRep had predicted.

  • anaphoras: after forcing referential representant output, the next one was still the representant; now it is the anaphoric one.

Changed

  • mostly refactoring

  • syno_sentences mixin deprecated, use synz > syn structure

  • assemble mixin deprecated, use itemz > item structure

[0.15.3] - 2018-04-17

Changed

  • global filtering is done automatically unless any filtering was been done during generation via filter mixin

  • noFilter parameter is deprecated

[0.15.2] - 2018-04-17

Added

  • French support for months

Changed

  • refactoring, no feature change

[0.15.1] - 2018-04-15

Fixed

  • pug render did not work - fixed.

  • doc is now also generated in one single large PDF file

[0.15.0] - 2018-04-14

Added

  • to raise the probability of a specific synonymic alternative to be triggered, use syn {weight:4} (4 times higher chances - default is 1)

  • to force a specific synonym to trigger, use synz {force:3} (to trigger the 3rd one)

    • this is useful while developping

    • force is not compatible with {mode:'sequence'}

    • if the forced alternative is empty, it will still not trigger it

Changed

  • synz 'sequence' syntax is not valid no more: use synz {mode:'sequence'}

  • changed the random algorithm: it is still random but does not provide exactly the same numbers as before; you shall update your regression tests (and I’m sorry for that).

  • defaultSynoType renamed to defaultSynoMode

  • setSynoProps, setSize, getSize removed

[0.14.1] - 2018-04-12

Fixed

  • semicolon (;) support in punctuation (and taking care of HTML entities which contain a semicolon)

  • spaces are automatically added before and after various mixins

[0.14.0] - 2018-04-09

Changed

  • titlecase is now a structure element and no more a mixin:

titlecase
  | what is this thing?

[0.13.0] - 2018-04-09

Added

  • eachz structure as (preferred) an alternative to the foreach mixin:

eachz elt in elts with { separator: ',', last_separator: 'and' }
  | #{elt}

[0.12.0] - 2018-04-09

Changed

  • main.pug is included automatically so do not include it yourself explicitely in your templates no nore.

[0.11.0] - 2018-04-09

Added

  • new protect structure tag that acts like protectString, to exclude some text from the filtering process:

  l
    protect bla.bla

[0.10.8] - 2018-04-08

  • just testing the release process - nothing changed

[0.10.7] - 2018-04-08

  • just testing the release process - nothing changed

[0.10.6] - 2018-04-08

  • just testing the release process - nothing changed

[0.10.5] - 2018-04-08

  • just testing the release process - nothing changed

[0.10.4] - 2018-04-05

Fixed

  • path issues to get RosaeNLG’s mixins

[0.10.3] - 2018-04-05

Fixed

  • align versions between rosaenlg and rosaenlg-core

[0.10.2] - 2018-04-05

Fixed

  • wrong French resources path

[0.10.1] - 2018-04-05

Fixed

  • wrong path in include node_modules/rosaenlg/main.pug

[0.10.0] - 2018-04-05

RosaeNLG is now a fork of Pug and not only a Pug add-on. Usage is easier, but maintenance is not.

Changed

  • easier integration:

    • include lib via const rosaenlgPug = require('rosaenlg');

    • then any pug method can be called, for instance rosaenlgPug.renderFile

    • no more (visible) NlgLib object

    • in your template, use include node_modules/rosaenlg/main.pug

  • automatic filtering unless noFilter is set to true

Added

  • new boolean parameter noFilter if don’t want to automatically filter the whole outputs

  • new structure keywords:

    • synz / syn to define synonyms: replaces +assemble

    • itemz / item to define list of items: replaces +syno_sentences

Fixed

  • a could be transformed into the by compromise in some situations

New syntax example: assemble
- setSize('listElts', 2)
mixin listElts(pos)
  case pos
    when 1
      | A
    when 2
      | B

t #[+assemble('listElts', {separator: ', ', last_separator: 'and'})]

is now:

t
  itemz {separator: ', ', last_separator: 'and'}
    item
      | A
    item
      | B
New syntax example: synonyms
- setSize('synos', 2)
mixin synos(rnd)
  case rnd
    when 1
      | A
    when 2
      | B

t #[+syno_sentences('synos')]

is now:

t
  synz
    syn
      | A
    syn
      | B

[0.9.4] - 2018-03-30

Added

  • When listing elements in a foreach or in an assemble, the list of the non empty elements is made available in params.nonEmpty.

[0.9.3] - 2018-03-29

Fixed

  • a/an specific cases, when a is:

    • is at the beginning of a sentence

    • is followed by capitalized text (an AI company)

    • is followed by a protected text

[0.9.2] - 2018-03-29

Added

  • …​ is automatically transformed into

  • Proper punctuation around : no space before and after etc. No automatic capitalisation after , as it depends of the context.

  • mixin eatSpace that 'eats' the spaces around him.

[0.9.1] - 2018-03-29

Fixed

  • a/an when uppercase: A apple now outputs An apple

  • missing French contractions when uppercase: De les→`Des`, De le→`Du`

[0.9.0] - 2018-03-27

Changed

  • in assemble or foreach with paragraph: true: paragraph parameter is deprecated, use either:

    • mode: 'paragraphs' to generate paragraphs

    • mode: 'sentences' to generate sentences without a new paragraph each time

Added

  • in assemblies, when mode is sentences or paragraphs:

    • new parameters: begin_last_1 and begin_last

    • begin_with_general can now be an array

[0.8.1] - 2018-03-26

Added

  • a first version of the tutorial Tutorial

Fixed

  • in assemble, when the mixin is not set, will automatically try to use value

  • in assemble and foreach: shuffle was done too late (after evaluation)

  • filter: remove spaces at the very end of the text

  • filter: capitalize the very beginning of the text

  • filter: capitalize after exclamation mark

  • filter: removes extra ponctuation when "!" and "." are combined

[0.8.0] - 2018-03-22

Added

  • A shy start of French conjugation with jslingua lib. No support for group 3 verbs.

[0.7.0] - 2018-03-22

Added

  • formatting of numbers in French in value thanks to format-number-french lib

  • plural of words in French: œilyeux etc. thanks to pluralize-fr lib

  • title case (which is more difficult than it appears) in English thanks to titlecase lib, in French thanks to titlecase-french lib

[0.6.2] - 2018-03-21

Fixed

  • </p> . </p> was not properly filtered

[0.6.1] - 2018-03-20

Added

  • synonym mode is now a global parameter (random - default, or sequence), via defaultSynoType in the constructor ; can be overridden locally using setSynoType; see mixins_ref.adoc#synonyms_mode

Fixed

  • a / an transformation was triggered in all languages, fixed to English only

[0.6.0] - 2018-03-20

Added

  • a/an in English: a industryan industry using compromise lib

[0.5.1] - 2018-03-20

Changed

  • function isNotEmpty() is deprecated because it brought side effects.

Fixed

  • bad prediction in assemble and syno_sentences due to test context that was too narrow - see listOfParaTricky in test_assembly_para

[0.5.0] - 2018-03-19

Added

  • uses compromise lib in en_US which was the basis for multiple new features in English:

    • plural of nouns: cranberrycranberries

    • pretty print of numbers: 562,407

    • textual numbers: five thousand five hundred

    • textual and numbered ordinals: 21st, twentieth

    • verbs conjugation with PRESENT PAST FUTURE tenses

  • direct access to compromise lib via util.compromise

  • empty prediction mechanism improvements:

    • better empty prediction mechanism that stops faster using exceptions. PS: it should have improded performance, but it didn’t.

    • user function isNotEmpty() to tell a specific structure is not empty.

    • new mode for synonyms: instead of choosing them randomly, you can trigger then in sequence (first then second etc.). Use setSynoType('syno mixin name', 'sequence') to do that. See mixins_ref.adoc#synonyms_sequence

Changed

  • randomSeed param of NlgLib constructor renamed to forceRandomSeed

[0.4.0] - 2018-03-15

Added

  • list of words with their gender in French

  • french adjectives agreement rules (well, most of it)

[0.3.1] - 2018-03-13

Fixed

  • adds spaces in assembly separators automatically if the user does not put them

[0.3] - 2018-03-09

Added

  • notion of language: fr_FR or en_US

[0.2] - 2018-03-07

  • initial version