Change log of RosaeNLG
[1.16.0] - 2020-06-12
Added
- 
on both node.js and Lambda API:
- 
/templates/versionto get the current RosaeNLG version deployed - 
accepts JWT token for authorisation
 
 - 
 
[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_fctcall:- 
agreeAdjandsubjectVerbAdjnow accept a list of adjectives - 
valueaccepts a list of elements as first parameter - 
verb,subjectVerbandsubjectVerbAdjas well for the subject - 
verb,subjectVerbandsubjectVerbAdjas well for the verb 
 - 
 - 
noSubjectflag onsubjectVerbandsubjectVerbAdjmixins to silent the subject 
[1.15.0] - 2020-05-05
Added
- 
Spanish support: verbs, words (gender, plural), adjectives, determiners
 - 
SEP_BEFOREandSEP_AFTERto 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
BEFOREadjective 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 (templateIdinsrcand not a top level element) - 
bug in
french-adjectiveswhen adjective was placed before noun and plural: generatedvieil alsaciensinstead ofvieux alsaciens 
Changed
- 
removed
substantivemixin: usevalueinstead withnumberparam, see Value for Nominal Groups - 
english-ordinalsis now a separate module - 
pluralize-frremoved from tiny runtime (automatically embeds a list of words with their plural instead) - 
french-adjectivesis not embedded no more in tiny version (using lists instead) - 
doc organization for verb and value mixins
 
[1.14.0] - 2020-04-05
[1.13.0] - 2020-03-29
Added
- 
ability to include raw js files (e.g.
include somejs.js), which is handy to be able to both lint and package these files in a json package 
Changed
- 
gulp-rosaenlg now automatically includes all files to be included by reading the templates content
 - 
as a consequence, in the
packageTemplateJsonfunction:- 
folderWithTemplatesis removed - 
entryTemplatemust now also contain the path 
 - 
 
[1.12.0] - 2020-03-16
Added
- 
(almost) ready to deploy Lambda functions for AWS
 - 
common content for
rosaenlg-node-serverandrosaenlg-lambdain separate packagerosaenlg-server-toolkit - 
tested (successfully) on different Node.js versions, see here
 
[1.10.2] - 2020-02-26
Added
- 
(much) better Italian ordinal support (up to 1 millions) thanks to Marco Riva
 - 
in
value, useagreeforORDINAL_TEXTUALinit_ITto have prima and not primo 
[1.10.0] - 2020-02-18
[1.9.0] - 2020-02-10
Changed
- 
more reliable
a/anfiltering in English: use ofenglish-a-anandenglish-a-an-listinstead ofcompromiseinrosaenlg-filter - 
more reliable Englisn plurals: use of
english-pluralsandenglish-plurals-listinstead ofcompromise - 
now using
n2wordsfor textual numbers in all languages, replacingwritten-numberfor French,write-intfor German,compromisefor English anditalian-ordinals-cardinalsfor Italian textual - 
replaced
compromisebyn2words+ custom code inspired by number-to-words for English ordinal numbers - 
completely removed
compromiselib 
[1.8.1] - 2020-02-05
Added
- 
en_US:- 
for verbs, replaced
compriselib withenglish-verbs,english-verbs-irregularandenglish-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.7.0] - 2020-01-20
Added
- 
rosaenlg-node-serveris 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) 
 - 
 
[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
 - 
/healthpath - 
time elapsed (performance) in the response and in the logging
 - 
static swagger published here
 
 - 
 
[1.5.8] - 2020-01-06
Fixed
- 
rosaenlg-node-server: when using persistent templates, templates were not reloaded when server was restarted 
Changed
- 
rosaenlg-node-server: http codes are now more precise; like in Return 404 instead of 500 when template does not exist - 
rosaenlg-node-server:reloadnow usesPUThttp method, and notGETno more 
[1.5.5] - 2019-12-13
[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
 
[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)
 - 
examples of templates showing the added value of a Natural Language Generator compared to a plain template engine like Pug
 
[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-demois now a package of the project 
[1.3.2] - 2019-10-27
[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
- 
recordSaidhasSaidanddeleteSaidexisted to safely record booleans; now there isrecordValuegetValueanddeleteValueto safely record numbers or strings - 
compare with CoreNLG in the documentation
 
[1.1.1] - 2019-10-09
Fixed
- 
Dev dependancies security issues thanks to Snyk
 - 
More French contractions (j’ai, lorsqu’il, puisqu’elle, jusqu’à etc.) thanks to CoreNLG source code
 
[1.0.0] - 2019-09-10
Added
- 
search engine available in RosaeNLG doc thanks to Algolia DocSearch (awesome product and support btw)
 
[0.18.1] - 2019-07-12 (private version)
Added
- 
adjinvaluemixin accepts more: can be a listadj:['beau', 'grand'], or an objectadj:{ BEFORE: ['beau', 'intelligent'], AFTER: ['brun'] } - 
DEMONSTRATIVEdeterminer type in Italian - 
possessive adjective param in value
possessiveAdjfor Italian possessives - 
boilerplate documentation see boilerplate project
 
[0.16.0] - 2019-05-11 (private version)
Fixed
- 
de #[+value(9000)](or any number) would contract intod'9 000. Now generatesde 9000properly. - 
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: trueinrenderFile - 
Numbers formatting: use
FORMATinvalueto set a format directly used bynumeral. See numeral.js formats. Very practical for currencies, %, etc. For instance+value(104000, {'FORMAT': '0a$'})will output 104k€ when generating French. - 
detto add a determiner (French and German); current determiners areDEFINITEandDEMONSTRATIVE. - 
It is now easier to complete the
paramsobject with new values withaddToParams:addToParams({xxx:yyy})is equivalent toObject.assign({}, params, {xxx:yyy}. - 
adjproperty invalueto add an adjective. - 
ownerproperty invalueto manage possessives. Does the same thing asthirdPossession. - 
recordSaidanddeleteSaiddo 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 tonumerallib - 
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
lefffderived resource. - 
Supported tenses:
PRESENTFUTURIMPARFAITPASSE_SIMPLECONDITIONNEL_PRESENTIMPERATIF_PRESENTSUBJONCTIF_PRESENTSUBJONCTIF_IMPARFAITPASSE_COMPOSEPLUS_QUE_PARFAIT. - 
For
PASSE_COMPOSEandPLUS_QUE_PARFAIT: useauxproperty (ETREorAVOIR) andagreeproperty:elles #[+verb(getAnonFP(), {verb: 'sortir', tense:'PASSE_COMPOSE', aux:'ETRE', agree: getAnonFP()})]generates elles sont sorties. Ifauxis not set, some rules will apply (transitive verbs rather takeAVOIR, etc.). - 
Use
pronominal:truefor pronominal form. 
 - 
 - 
French gender shortcuts:
- 
setRefGender(PRODUCT, 'bague');will look forbaguein the dictionnary and setPRODUCTgender toF. - 
#[+value('bague', {represents: PRODUIT})]will output bague and set the gender ofPRODUITtoFvia the dictionnary. 
 - 
 - 
French contractions:
- 
now manage ce/cet: ce arbre becomes cet arbre
 - 
manages "h aspiré": le hérisson vs l’hebdomadaire
 
 - 
 - 
French adjectives:
- 
adjPosinvalueto 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.
 - 
getMFNhelper (makes the same job thangetMorF). - 
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
 
Changed
- 
Some speed optimizations (which are not significant)
 - 
Refactoring: switched to TypeScript for most of the code
 - 
Some renaming: please impact your templates
- 
shufflerenamed tomix - 
REPRESENTANT: 'ana'renamed toREPRESENTANT: 'refexpr' 
 - 
 - 
Updated librairies and linguistic resources documentation: see index.adoc#resources
 - 
Replaced
better-title-case, which was deprecated on npm, bybetter-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 havemomentlib. Use#[+value(date, 'MMMM')]instead. - 
Removed
format-number-french(replaced bynumeral). - 
Removed
jslingua(replaced by custom lefff extract). - 
valWithUnitis deprecated and removed. - 
loadDictparam is removed; ressources a just loaded when necessary. - 
Removed
registerSubst. UsesetRefGenderNumberdirectly. - 
updated many libs: copyfiles mocha rimraf better-sqlite3 compromise moment written-number
 
[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 thatgetNextRephad predicted. - 
anaphoras: after forcing referential representant output, the next one was still the representant; now it is the anaphoric one.
 
[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
 - 
forceis 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: usesynz {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).
 - 
defaultSynoTyperenamed todefaultSynoMode - 
setSynoProps,setSize,getSizeremoved 
[0.14.0] - 2018-04-09
Changed
- 
titlecaseis now a structure element and no more a mixin: 
titlecase | what is this thing?
- 
FYI the titlecase npm package, which is used in en_US, is no longer maintained
 
[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)
NlgLibobject - 
in your template, use
include node_modules/rosaenlg/main.pug 
 - 
 - 
automatic filtering unless
noFilteris set totrue 
Added
- 
new boolean parameter
noFilterif don’t want to automatically filter the whole outputs - 
new structure keywords:
- 
synz/synto define synonyms: replaces+assemble - 
itemz/itemto define list of items: replaces+syno_sentences 
 - 
 
Fixed
- 
acould be transformed intotheby compromise in some situations 
- 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
- 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.0] - 2018-03-27
[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 usevalue - 
in
assembleandforeach: 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.6.1] - 2018-03-20
Added
- 
synonym mode is now a global parameter (
random- default, orsequence), viadefaultSynoTypein the constructor ; can be overridden locally usingsetSynoType; see mixins_ref.adoc#synonyms_mode 
[0.5.0] - 2018-03-19
Added
- 
uses
compromiselib inen_USwhich was the basis for multiple new features in English:- 
plural of nouns: cranberry → cranberries
 - 
pretty print of numbers: 562,407
 - 
textual numbers: five thousand five hundred
 - 
textual and numbered ordinals: 21st, twentieth
 - 
verbs conjugation with
PRESENTPASTFUTUREtenses 
 - 
 - 
direct access to
compromiselib viautil.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 
 -