Commit 75a3b69d authored by Ludan Stoecklé's avatar Ludan Stoecklé

1.10.2

parent 47cf5aeb
......@@ -20,7 +20,7 @@ stages:
# variables etc.
variables:
ROSAENLG_VERSION: 1.10.1
ROSAENLG_VERSION: 1.10.2
DOCKER_REGISTRY: registry.gitlab.com/rosaenlg-projects/rosaenlg
DOCKER_CLI_ROOT: ${DOCKER_REGISTRY}/cli
DOCKER_SERVER_ROOT: ${DOCKER_REGISTRY}/server
......
{
"name": "browser-ide-demo",
"version": "1.10.1",
"version": "1.10.2",
"description": "Client side demo of NLG templates compilation and rendering using RosaeNLG",
"main": "index.js",
"scripts": {
......@@ -33,7 +33,7 @@
"gulp-inject-string": "^1.1.2",
"gulp-rename": "^1.4.0",
"merge-stream": "^2.0.0",
"rosaenlg": "1.10.1",
"rosaenlg": "1.10.2",
"vue-codemirror": "^4.0.6"
}
}
{
"name": "content-deduplicate",
"version": "0.5.1",
"version": "0.5.2",
"description": "Calculates distances between texts to prevent duplicate content",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -54,6 +54,6 @@
},
"dependencies": {
"k-medoids": "^1.0.6",
"synonym-optimizer": "2.10.1"
"synonym-optimizer": "2.10.2"
}
}
{
"name": "english-a-an-list",
"version": "0.2.1",
"version": "0.2.2",
"description": "English words and adjectives that are preceded by the indefinite article 'an', based on WordNet",
"main": "dist/aan.json",
"scripts": {
......
{
"name": "english-a-an",
"version": "0.2.1",
"version": "0.2.2",
"description": "English a/an indefinite articles, based on WordNet",
"main": "dist/index.js",
"scripts": {
......@@ -13,7 +13,7 @@
"url": "[email protected]:rosaenlg-projects/rosaenlg.git"
},
"devDependencies": {
"english-a-an-list": "0.2.1",
"english-a-an-list": "0.2.2",
"mocha": "^6.2.2",
"typescript": "^3.7.2"
},
......
{
"name": "english-determiners",
"version": "2.10.1",
"version": "2.10.2",
"description": "English determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "english-plurals-list",
"version": "0.2.1",
"version": "0.2.2",
"description": "English irregular plurals list, based on WordNet",
"main": "dist/plurals.json",
"scripts": {
......
{
"name": "english-plurals",
"version": "0.2.1",
"version": "0.2.2",
"description": "English plural of words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"devDependencies": {
"english-plurals-list": "0.2.1",
"english-plurals-list": "0.2.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
......
{
"name": "english-verbs-gerunds",
"version": "0.2.1",
"version": "0.2.2",
"description": "English irregular gerunds list (-ing), based on WordNet",
"main": "dist/gerunds.json",
"scripts": {
......
{
"name": "english-verbs-helper",
"version": "0.2.1",
"version": "0.2.2",
"description": "English verbs conjugation",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,8 +45,8 @@
}
},
"devDependencies": {
"english-verbs-gerunds": "0.2.1",
"english-verbs-irregular": "0.2.1",
"english-verbs-gerunds": "0.2.2",
"english-verbs-irregular": "0.2.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
......
{
"name": "english-verbs-irregular",
"version": "0.2.1",
"version": "0.2.2",
"description": "English irregular verbs list (JSON)",
"main": "dist/verbs.json",
"scripts": {
......
{
"name": "french-adjectives",
"version": "2.10.1",
"version": "2.10.2",
"description": "Agreement of adjectives in French",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -46,7 +46,7 @@
},
"dependencies": {
"debug": "^4.1.1",
"french-h-muet-aspire": "2.10.1"
"french-h-muet-aspire": "2.10.2"
},
"keywords": [
"french",
......
{
"name": "french-determiners",
"version": "2.10.1",
"version": "2.10.2",
"description": "French determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "french-h-muet-aspire",
"version": "2.10.1",
"version": "2.10.2",
"description": "List of French words that are 'aspiré' (vs. 'muet')",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "french-ordinals",
"version": "2.10.1",
"version": "2.10.2",
"description": "Ordinal numbers in French: 12 => douzième",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "french-verbs-intransitive",
"version": "0.3.1",
"version": "0.3.2",
"description": "list of intransitive French verbs",
"main": "dist/intransitive.json",
"scripts": {
......
{
"name": "french-verbs-lefff",
"version": "0.3.1",
"version": "0.3.2",
"description": "French verbs conjugation data, based on the Lefff content",
"main": "dist/conjugations.json",
"scripts": {
......
{
"name": "french-verbs-transitive",
"version": "0.3.1",
"version": "0.3.2",
"description": "French transitive verbs, based on Wikipedia",
"main": "dist/transitive.json",
"scripts": {
......
{
"name": "french-verbs",
"version": "2.10.1",
"version": "2.10.2",
"description": "French verbs conjugation",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -46,11 +46,11 @@
},
"dependencies": {
"debug": "^4.1.1",
"french-h-muet-aspire": "2.10.1",
"french-verbs-transitive": "0.3.1"
"french-h-muet-aspire": "2.10.2",
"french-verbs-transitive": "0.3.2"
},
"devDependencies": {
"french-verbs-lefff": "0.3.1",
"french-verbs-lefff": "0.3.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
......
{
"name": "french-words-gender-lefff",
"version": "0.3.1",
"version": "0.3.2",
"description": "French words gender, based on the Lefff content",
"main": "dist/words.json",
"scripts": {
......
{
"name": "french-words-gender",
"version": "2.10.1",
"version": "2.10.2",
"description": "Gender of French words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -48,7 +48,7 @@
"debug": "^4.1.1"
},
"devDependencies": {
"french-words-gender-lefff": "0.3.1",
"french-words-gender-lefff": "0.3.2",
"gulp": "^4.0.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
......
{
"name": "german-adjectives-dict",
"version": "0.3.1",
"version": "0.3.2",
"description": "German adjectives dictionnary, based on the german-pos-dict content",
"main": "dist/adjectives.json",
"scripts": {
......
{
"name": "german-adjectives",
"version": "2.10.1",
"version": "2.10.2",
"description": "German adjectives agreement",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"devDependencies": {
"german-adjectives-dict": "0.3.1",
"german-adjectives-dict": "0.3.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
......
{
"name": "german-determiners",
"version": "2.10.1",
"version": "2.10.2",
"description": "German determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "german-dict-helper",
"version": "2.10.1",
"version": "2.10.2",
"description": "Helper functions on an included database derived from german-pos-dict",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "german-ordinals",
"version": "2.10.1",
"version": "2.10.2",
"description": "Ordinal numbers in German: 12 => zwölfte",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "german-verbs-dict",
"version": "0.3.1",
"version": "0.3.2",
"description": "German verbs dictionnary, based on the german-pos-dict content",
"main": "dist/verbs.json",
"scripts": {
......
{
"name": "german-verbs",
"version": "2.10.1",
"version": "2.10.2",
"description": "German verbs, based on german-pos-dict",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"devDependencies": {
"german-verbs-dict": "0.3.1",
"german-verbs-dict": "0.3.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
},
......
{
"name": "german-words-dict",
"version": "0.3.1",
"version": "0.3.2",
"description": "German words dictionnary, based on the german-pos-dict content",
"main": "dist/words.json",
"scripts": {
......
{
"name": "german-words",
"version": "2.10.1",
"version": "2.10.2",
"description": "Gender and case of German words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -48,7 +48,7 @@
}
},
"devDependencies": {
"german-words-dict": "0.3.1",
"german-words-dict": "0.3.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
......
{
"name": "gulp-rosaenlg",
"version": "2.10.1",
"version": "2.10.2",
"description": "RosaeNLG client side packaging helper",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -61,6 +61,6 @@
"browserify": "^16.5.0",
"debug": "^4.1.1",
"minify-stream": "^1.2.1",
"rosaenlg": "1.10.1"
"rosaenlg": "1.10.2"
}
}
{
"name": "italian-adjectives-dict",
"version": "0.3.1",
"version": "0.3.2",
"description": "Italian adjectives dictionnary, based on the morph-it linguistic resource",
"main": "dist/adjectives.json",
"scripts": {
......
{
"name": "italian-adjectives",
"version": "2.10.1",
"version": "2.10.2",
"description": "Italian adjectives helper",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -41,7 +41,7 @@
}
},
"devDependencies": {
"italian-adjectives-dict": "0.3.1",
"italian-adjectives-dict": "0.3.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"typescript": "^3.7.2"
......@@ -54,6 +54,6 @@
"license": "MIT",
"dependencies": {
"debug": "^4.1.1",
"rosaenlg-filter": "2.10.1"
"rosaenlg-filter": "2.10.2"
}
}
{
"name": "italian-determiners",
"version": "2.10.1",
"version": "2.10.2",
"description": "Italian determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
# italian-ordinals-cardinals
A very simple Node.js module that gives textual representations of ordinal numbers in Italian: 12 => _dodicesimo_ (up to 100).
A very simple Node.js module that gives textual representations of ordinal numbers in Italian: 12 => _dodicesimo_ (up to 1000000 included thanks to Marco Riva!).
Cardinal numbers representation in this module has been removed:
- support was very poor in general
......@@ -21,11 +21,7 @@ var ordinalsCardinals = require('italian-ordinals-cardinals');
console.log(`12 => ${ordinalsCardinals.getOrdinal(12)}`);
```
## Todo
make it dynamic for larger numbers
## Dependancies
N/A
`n2words` for cardinal numbers before transforming them in ordinal numbers
......@@ -2,3 +2,7 @@ const ordinalsCardinals = require('./dist/index.js');
// dodicesimo
console.log(`12 => ${ordinalsCardinals.getOrdinal(12)}`);
// novecentonovantanovemilanovecentonovantanovesimo
console.log(`999999 => ${ordinalsCardinals.getOrdinal(999999)}`);
// milionesimo
console.log(`1000000 => ${ordinalsCardinals.getOrdinal(1000000)}`);
const ordinalsBeginning = [
'primo',
'secondo',
'terzo',
'quarto',
'quinto',
'sesto',
'settimo',
'ottavo',
'nono',
'decimo',
'undicesimo',
'dodicesimo',
'tredicesimo',
'quattordicesimo',
'quindicesimo',
'sedicesimo',
'diciassettesimo',
'diciottesimo',
'diciannovesimo',
'ventesimo',
'ventunesimo',
'ventiduesimo',
'ventitreesimo',
'ventiquattresimo',
'venticinquesimo',
'ventiseiesimo',
'ventisettesimo',
'ventottesimo',
'ventinovesimo',
'trentesimo',
'trentunesimo',
'trentaduesimo',
'trentatreesimo',
'Trentaquattresimo',
'trentacinquesimo',
'Trentaseiesimo',
'trentasettesimo',
'trentottesimo',
'trentanovesimo',
'quarantesimo',
'quarantunesimo',
'quarantaduesimo',
'quarantatreesimo',
'quarantiquattresimo',
'quarantacinquesimo',
'quarantaseiesimo',
'quarantasettesimo',
'quarantottesimo',
'quarantanovesimo',
'cinquantesimo',
'cinquantunesimo',
'cinquantiduesimo',
'cinquantitreesimo',
'cinquantiquattresimo',
'cinquantacinquesimo',
'cinquantaseiesimo',
'cinquantisettesimo',
'cinquantottesimo',
'cinquantinovesimo',
'sessantesimo',
'sessantunesimo',
'sessantaduesimo',
'sessantatreesimo',
'sessantaquattresimo',
'sessanticinquesimo',
'sessantiseisimo',
'sessantisettesimo',
'sessantiottesimo',
'Sessantanovesimo',
'settantesimo',
'settantunesimo',
'settantaduesimo',
'settantatreesimo',
'settantiquattresimo',
'settantacinquesimo',
'settantiseisimo',
'settantasettesimo',
'settantiottesime',
'settantinovesimo',
'ottantesimo',
'ottantunesimo',
'ottantaduesimo',
'ottantatreesimo',
'ottantaquattro',
'ottanticinquesimo',
'ottantiseisimo',
'ottantisettesimo',
'ottantiottesimo',
'novantinovesimo',
'novantesimo',
'novanta undicesimo',
'ottanta dodicesimo',
'novantatresimo',
'ottantaquattro',
'ottanticinquesimo',
'ottantiseisimo',
'novantisettesimo',
'novantiottesimo',
'novantinovesimo',
'centesimo',
];
import n2words = require('n2words');
const otherOrdinals = {
200: 'duecentesimo',
300: 'trecentesimo',
400: 'quattrocentesimo',
500: 'cinquecentesimo',
600: 'seicentesimo',
700: 'settecentesimo',
800: 'ottocentesimo',
900: 'novecentesimo',
1000: 'millesimo',
10000: 'diecimillesimo',
100000: 'centomillesimo',
1000000: 'millionesimo',
1000000000: 'milliardesimo',
const fixedOrdinals = {
M: {
1: 'primo',
2: 'secondo',
3: 'terzo',
4: 'quarto',
5: 'quinto',
6: 'sesto',
7: 'settimo',
8: 'ottavo',
9: 'nono',
10: 'decimo',
1000000: 'milionesimo',
1000000000: 'miliardesimo',
},
F: {
1: 'prima',
2: 'seconda',
3: 'terza',
4: 'quarta',