Change log of the RosaeNLG npm module
[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
 
-