Commit cd667a00 authored by Ludan Stoecklé's avatar Ludan Stoecklé

1.16.2

parent 8de4fe6a
......@@ -20,7 +20,7 @@ stages:
# variables etc.
variables:
ROSAENLG_VERSION: 1.16.1
ROSAENLG_VERSION: 1.16.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-2",
"version": "0.3.1",
"version": "0.3.2",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......@@ -41,8 +41,8 @@
"gulp-awspublish": "^4.0.1",
"gulp-rename": "^2.0.0",
"merge-stream": "^2.0.0",
"rosaenlg": "1.16.1",
"rosaenlg-packager": "0.3.1",
"rosaenlg": "1.16.2",
"rosaenlg-packager": "0.3.2",
"s3": "^4.4.0",
"vue-simple-alert": "^1.1.1",
"vue-template-compiler": "^2.6.11"
......
{
"name": "english-a-an-list",
"version": "0.8.1",
"version": "0.8.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.8.1",
"version": "0.8.2",
"description": "English a/an indefinite articles, based on WordNet",
"main": "dist/index.js",
"scripts": {
......@@ -44,7 +44,7 @@
}
},
"devDependencies": {
"english-a-an-list": "0.8.1"
"english-a-an-list": "0.8.2"
},
"keywords": [
"English",
......
{
"name": "english-determiners",
"version": "2.16.1",
"version": "2.16.2",
"description": "English determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "english-ordinals",
"version": "0.2.1",
"version": "0.2.2",
"description": "Ordinal numbers in English: 1 => first etc.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "english-plurals-list",
"version": "0.8.1",
"version": "0.8.2",
"description": "English irregular plurals list, based on WordNet",
"main": "dist/plurals.json",
"scripts": {
......
{
"name": "english-plurals",
"version": "0.8.1",
"version": "0.8.2",
"description": "English plural of words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"devDependencies": {
"english-plurals-list": "0.8.1"
"english-plurals-list": "0.8.2"
},
"keywords": [
"words",
......
{
"name": "english-verbs-gerunds",
"version": "0.8.1",
"version": "0.8.2",
"description": "English irregular gerunds list (-ing), based on WordNet",
"main": "dist/gerunds.json",
"scripts": {
......
{
"name": "english-verbs-helper",
"version": "0.8.1",
"version": "0.8.2",
"description": "English verbs conjugation",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,8 +45,8 @@
}
},
"devDependencies": {
"english-verbs-gerunds": "0.8.1",
"english-verbs-irregular": "0.8.1"
"english-verbs-gerunds": "0.8.2",
"english-verbs-irregular": "0.8.2"
},
"keywords": [
"verbs",
......
{
"name": "english-verbs-irregular",
"version": "0.8.1",
"version": "0.8.2",
"description": "English irregular verbs list (JSON)",
"main": "dist/verbs.json",
"scripts": {
......
{
"name": "french-adjectives-wrapper",
"version": "0.2.1",
"version": "0.2.2",
"description": "Agreement of adjectives in French - Wrapper",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,8 +45,8 @@
}
},
"dependencies": {
"french-adjectives": "2.16.1",
"french-contractions": "2.16.1"
"french-adjectives": "2.16.2",
"french-contractions": "2.16.2"
},
"keywords": [
"french",
......
{
"name": "french-adjectives",
"version": "2.16.1",
"version": "2.16.2",
"description": "Agreement of adjectives in French",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"dependencies": {
"french-contractions": "2.16.1"
"french-contractions": "2.16.2"
},
"keywords": [
"french",
......
{
"name": "french-contractions",
"version": "2.16.1",
"version": "2.16.2",
"description": "French contractions: le hérisson, l'homme, ce yaourt, cet arbre",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "french-determiners",
"version": "2.16.1",
"version": "2.16.2",
"description": "French determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "french-ordinals",
"version": "2.16.1",
"version": "2.16.2",
"description": "Ordinal numbers in French: 12 => douzième",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "french-verbs-intransitive",
"version": "0.9.1",
"version": "0.9.2",
"description": "list of intransitive French verbs",
"main": "dist/intransitive.json",
"scripts": {
......
{
"name": "french-verbs-lefff",
"version": "0.9.1",
"version": "0.9.2",
"description": "French verbs conjugation data, based on the Lefff content",
"main": "dist/conjugations.json",
"scripts": {
......
{
"name": "french-verbs-transitive",
"version": "0.9.1",
"version": "0.9.2",
"description": "French transitive verbs, based on Wikipedia",
"main": "dist/transitive.json",
"scripts": {
......
{
"name": "french-verbs",
"version": "2.16.1",
"version": "2.16.2",
"description": "French verbs conjugation",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,11 +45,11 @@
}
},
"dependencies": {
"french-contractions": "2.16.1",
"french-verbs-transitive": "0.9.1"
"french-contractions": "2.16.2",
"french-verbs-transitive": "0.9.2"
},
"devDependencies": {
"french-verbs-lefff": "0.9.1"
"french-verbs-lefff": "0.9.2"
},
"keywords": [
"verbs",
......
{
"name": "french-words-gender-lefff",
"version": "0.9.1",
"version": "0.9.2",
"description": "French words gender, based on the Lefff content",
"main": "dist/words.json",
"scripts": {
......
{
"name": "french-words",
"version": "0.2.1",
"version": "0.2.2",
"description": "Gender and plural of French words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -48,7 +48,7 @@
"pluralize-fr": "^1.0.1"
},
"devDependencies": {
"french-words-gender-lefff": "0.9.1",
"french-words-gender-lefff": "0.9.2",
"gulp": "^4.0.2"
},
"keywords": [
......
{
"name": "german-adjectives-dict",
"version": "0.9.1",
"version": "0.9.2",
"description": "German adjectives dictionnary, based on the german-pos-dict content",
"main": "dist/adjectives.json",
"scripts": {
......
{
"name": "german-adjectives",
"version": "2.16.1",
"version": "2.16.2",
"description": "German adjectives agreement",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"devDependencies": {
"german-adjectives-dict": "0.9.1"
"german-adjectives-dict": "0.9.2"
},
"keywords": [
"adjectives",
......
{
"name": "german-determiners",
"version": "2.16.1",
"version": "2.16.2",
"description": "German determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "german-dict-helper",
"version": "2.16.1",
"version": "2.16.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.16.1",
"version": "2.16.2",
"description": "Ordinal numbers in German: 12 => zwölfte",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "german-verbs-dict",
"version": "0.9.1",
"version": "0.9.2",
"description": "German verbs dictionnary, based on the german-pos-dict content",
"main": "dist/verbs.json",
"scripts": {
......
{
"name": "german-verbs",
"version": "2.16.1",
"version": "2.16.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.9.1"
"german-verbs-dict": "0.9.2"
},
"keywords": [
"verbs",
......
{
"name": "german-words-dict",
"version": "0.9.1",
"version": "0.9.2",
"description": "German words dictionnary, based on the german-pos-dict content",
"main": "dist/words.json",
"scripts": {
......
{
"name": "german-words",
"version": "2.16.1",
"version": "2.16.2",
"description": "Gender and case of German words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -45,7 +45,7 @@
}
},
"devDependencies": {
"german-words-dict": "0.9.1"
"german-words-dict": "0.9.2"
},
"keywords": [
"words",
......
{
"name": "italian-adjectives-dict",
"version": "0.9.1",
"version": "0.9.2",
"description": "Italian adjectives dictionnary, based on the morph-it linguistic resource",
"main": "dist/adjectives.json",
"scripts": {
......
{
"name": "italian-adjectives",
"version": "2.16.1",
"version": "2.16.2",
"description": "Italian adjectives helper",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -41,7 +41,7 @@
}
},
"devDependencies": {
"italian-adjectives-dict": "0.9.1"
"italian-adjectives-dict": "0.9.2"
},
"keywords": [
"adjectives",
......@@ -50,6 +50,6 @@
"author": "Ludan Stoecklé <[email protected]>",
"license": "MIT",
"dependencies": {
"rosaenlg-filter": "2.16.1"
"rosaenlg-filter": "2.16.2"
}
}
{
"name": "italian-determiners",
"version": "2.16.1",
"version": "2.16.2",
"description": "Italian determiners",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "italian-ordinals-cardinals",
"version": "2.16.1",
"version": "2.16.2",
"description": "Ordinal and cardinal numbers in Italian",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "italian-verbs-dict",
"version": "0.9.1",
"version": "0.9.2",
"description": "Italian verbs dictionnary, based on morph-it",
"main": "dist/verbs.json",
"scripts": {
......
{
"name": "italian-verbs",
"version": "2.16.1",
"version": "2.16.2",
"description": "Italian verbs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -41,7 +41,7 @@
}
},
"devDependencies": {
"italian-verbs-dict": "0.9.1"
"italian-verbs-dict": "0.9.2"
},
"keywords": [
"verbs",
......
{
"name": "italian-words-dict",
"version": "0.9.1",
"version": "0.9.2",
"description": "Italian words dictionnary, based on the morph-it linguistic resource",
"main": "dist/words.json",
"scripts": {
......
{
"name": "italian-words",
"version": "2.16.1",
"version": "2.16.2",
"description": "Gender and plural of Italian words",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......@@ -41,7 +41,7 @@
}
},
"devDependencies": {
"italian-words-dict": "0.9.1"
"italian-words-dict": "0.9.2"
},
"keywords": [
"words",
......
{
"name": "lefff-helper",
"version": "2.16.1",
"version": "2.16.2",
"description": "Helper functions on an included database derived from Lefff",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "morph-it-helper",
"version": "2.16.1",
"version": "2.16.2",
"description": "Helper functions on an included database derived from morph-it (Free Morphological Lexicon for the Italian Language)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
{
"name": "rosaenlg-browser-poc",
"version": "1.8.1",
"version": "1.8.2",
"description": "Browser side NLG using RosaeNLG (rendering only).",
"main": "index.js",
"private": true,
......@@ -26,7 +26,7 @@
"homepage": "https://rosaenlg.org",
"dependencies": {
"gulp": "^4.0.2",
"rosaenlg": "1.16.1",
"rosaenlg-packager": "0.3.1"
"rosaenlg": "1.16.2",
"rosaenlg-packager": "0.3.2"
}
}
{
"name": "rosaenlg-cli",
"version": "1.16.1",
"version": "1.16.2",
"description": "RosaeNLG's CLI interface",
"bin": {
"rosaenlg": "./index.js",
......@@ -11,8 +11,8 @@
"chalk": "^3.0.0",
"commander": "^5.0.0",
"mkdirp": "^1.0.3",
"rosaenlg": "1.16.1",
"rosaenlg-packager": "0.3.1"
"rosaenlg": "1.16.2",
"rosaenlg-packager": "0.3.2"
},
"devDependencies": {
"rimraf": "^3.0.0"
......
......@@ -68,4 +68,8 @@ export class Constants {
private getTousCaracteresMinusculesRe(): string {
return 'a-z' + this.toutesVoyellesMinuscules;
}
public getInBetween(beforeProtect: boolean): string {
return beforeProtect ? '§[\\s¤]*' : '';
}
}
......@@ -10,21 +10,22 @@ function redoCapitalization(initial: string, replacement: string): string {
}
}
// quite the same as aAn but works when the string is protected
export function aAnBeforeProtect(input: string, _lang: Languages, constants: Constants): string {
function aAnGeneric(input: string, _lang: Languages, constants: Constants, beforeProtect: boolean): string {
let res = input;
//console.log('xxx' + input);
const regexA = new RegExp(
`([^${constants.tousCaracteresMinMajRe}])([aA])${constants.stdBetweenWithParenthesis}§[\\s¤]*([${constants.tousCaracteresMinMajRe}]*)`,
`([^${constants.tousCaracteresMinMajRe}])([aA])${constants.stdBetweenWithParenthesis}(${constants.getInBetween(
beforeProtect,
)})([${constants.tousCaracteresMinMajRe}]*)`,
'g',
);
res = res.replace(regexA, function (match, before, aA, between, word): string {
res = res.replace(regexA, function (match, before, aA, between, beforeWord, word): string {
// console.log(`BEFORE PROTECT <${before}> <${aA}> <${between}> <${word}>`);
if (word != null && word != '') {
// can be null when orphan "a" at the very end of a text
const newAa = redoCapitalization(aA, getAAn(anList, word));
return `${before}${newAa}${between}§${word}`;
return `${before}${newAa}${between}${beforeWord}${word}`;
} else {
return match;
}
......@@ -33,24 +34,11 @@ export function aAnBeforeProtect(input: string, _lang: Languages, constants: Con
return res;
}
export function aAnBeforeProtect(input: string, _lang: Languages, constants: Constants): string {
return aAnGeneric(input, _lang, constants, true);
}
export function aAn(input: string, _lang: Languages, constants: Constants): string {
let res = input;
const regexA = new RegExp(
`([^${constants.tousCaracteresMinMajRe}])([aA])${constants.stdBetweenWithParenthesis}([${constants.tousCaracteresMinMajRe}]*)`,
'g',