rosaenlg-filter
Advanced tools
Comparing version 3.1.1 to 3.1.2
@@ -14,3 +14,5 @@ /** | ||
private getDetElt; | ||
private articlesContractions; | ||
private twoWordsContractions; | ||
contractions(input: string): string; | ||
} |
@@ -27,3 +27,3 @@ "use strict"; | ||
} | ||
contractions(input) { | ||
articlesContractions(input) { | ||
let res = input; | ||
@@ -94,4 +94,31 @@ // definite masc sing | ||
} | ||
twoWordsContractions(input) { | ||
let res = input; | ||
// https://www.italien-facile.com/exercices/exercice-italien-2/exercice-italien-78139.php | ||
const seconds = ['il', 'lo', "l'", 'i', 'gli', 'la', 'le']; | ||
const contrList = { | ||
a: ['al', 'allo', "all'", 'ai', 'agli', 'alla', 'alle'], | ||
di: ['del', 'dello', "dell'", 'dei', 'degli', 'della', 'delle'], | ||
da: ['dal', 'dallo', "dall'", 'dai', 'dagli', 'dalla', 'dalle'], | ||
in: ['nel', 'nello', "nell'", 'nei', 'negli', 'nella', 'nelle'], | ||
su: ['sul', 'sullo', "sull'", 'sui', 'sugli', 'sulla', 'sulle'], | ||
}; | ||
const preps = Object.keys(contrList); | ||
for (let i = 0; i < preps.length; i++) { | ||
const prep = preps[i]; | ||
const vals = contrList[prep]; | ||
for (let j = 0; j < seconds.length; j++) { | ||
res = this.contract2elts(prep, seconds[j], vals[j], res); | ||
} | ||
} | ||
return res; | ||
} | ||
contractions(input) { | ||
let res = input; | ||
res = this.articlesContractions(res); | ||
res = this.twoWordsContractions(res); | ||
return res; | ||
} | ||
} | ||
exports.LanguageFilterItalian = LanguageFilterItalian; | ||
//# sourceMappingURL=LanguageFilterItalian.js.map |
{ | ||
"name": "rosaenlg-filter", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "Filtering feature of RosaeNLG", | ||
@@ -45,6 +45,6 @@ "main": "dist/index.js", | ||
"better-title-case": "^1.0.1", | ||
"english-a-an": "1.1.1", | ||
"english-a-an-list": "1.1.1", | ||
"french-contractions": "3.1.1", | ||
"rosaenlg-commons": "1.1.1", | ||
"english-a-an": "1.1.2", | ||
"english-a-an-list": "1.1.2", | ||
"french-contractions": "3.1.2", | ||
"rosaenlg-commons": "1.1.2", | ||
"titlecase-french": "^1.0.1" | ||
@@ -63,3 +63,3 @@ }, | ||
}, | ||
"gitHead": "0f834c628a578b30fe8c1ea9e6ffa1334e8d601b" | ||
"gitHead": "656f0dd322b8bf7f55ced83b300a32f75089928b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
313735
1723
+ Addedenglish-a-an@1.1.2(transitive)
+ Addedenglish-a-an-list@1.1.2(transitive)
+ Addedfrench-contractions@3.1.2(transitive)
+ Addedrosaenlg-commons@1.1.2(transitive)
- Removedenglish-a-an@1.1.1(transitive)
- Removedenglish-a-an-list@1.1.1(transitive)
- Removedfrench-contractions@3.1.1(transitive)
- Removedrosaenlg-commons@1.1.1(transitive)
Updatedenglish-a-an@1.1.2
Updatedenglish-a-an-list@1.1.2
Updatedfrench-contractions@3.1.2
Updatedrosaenlg-commons@1.1.2