Libraries

This is the documentation for 1.18.1 version, which is not the latest version. Consider upgrading to 3.4.0.

Libraries complement RosaeNLG’s core features.

For instance the countries library generates names of countries (le Royaume-Uni, the United Kingdom etc.).

Libraries are packaged as npm modules. They usually contain JavaScript and Pug code that must be included in your project.

Installation and Usage are described for rosaenlg-countries.

Installation

npm install rosaenlg-countries

Usage

include ../node_modules/rosaenlg-countries/dist/countries.pug
include ../node_modules/rosaenlg-countries/dist/countries_en_US.js

| #[+country({cca2: 'FR'})]
You might have to adapt the path. In the example, templates are in a folder sibling from node_modules.