Skip to content

Commit

Permalink
Fixed phonetics/french/fonem V-10 rule
Browse files Browse the repository at this point in the history
Related to #175
  • Loading branch information
Yomguithereal committed Sep 2, 2020
1 parent 7ac6475 commit 80c87bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/phonetics/french/fonem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const RULES = {
'V-7': [/([^G])AY$/, '$1E'],
'V-8': [/EUX$/, 'EU'],
'V-9': [`EY(?=$|${C})`, 'E'],
'V-10': [`(${C})?Y(?!${V})`, '$1I'],
'V-10': [`(^|${C})Y(?=${V}|$)|(^|${V})Y(?=${C}|$)`, '$1$2I'],
'V-11': [`(${V})I(?=${V})`, '$1Y'],
'V-12': [`(${V})ILL`, '$1Y'],
'V-13': [/OU(?=I(?!LL)|[AEOU])/g, 'W'],
Expand Down
6 changes: 5 additions & 1 deletion test/phonetics/french/fonem.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ describe('fonem', function() {
['STE-CROIX', 'STE-KROIX'],
['LAVALLEE', 'LAVALE'],
['CORINNE', 'KORINE'],
['DUTILE', 'DUTILLE']
['DUTILE', 'DUTILLE'],

// https://github.com/Yomguithereal/talisman/issues/175
['TYOU', 'TIOU'],
['YOU', 'IOU']
];

tests.forEach(function([name, code]) {
Expand Down

0 comments on commit 80c87bc

Please sign in to comment.