Libraries

This is the documentation for 3.0.1 version, which is not the latest version. Consider upgrading to 4.3.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.