Skip to content

Commit

Permalink
Fixing phonetics/french/fonem C-28 rule
Browse files Browse the repository at this point in the history
Relate to #175
  • Loading branch information
Yomguithereal committed Sep 2, 2020
1 parent 25764ea commit fec8bdb
Show file tree
Hide file tree
Showing 2 changed files with 4 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 @@ -80,7 +80,7 @@ const RULES = {
'C-25': [/([AIOUY])W/g, '$1'],
'C-26': [/X[CSZ]/g, 'X'],
'C-27': [`(?:Z(?=${V})|(${C})Z(?=${C}))`, '$1S'],
'C-28': [`(?:([${CONSONANTS}CLS])\\1|(C)C(?!${V})|(.S)S(?!${V})|([^I]L)L)`, '$1$2$3$4'],
'C-28': [`(?:([${CONSONANTS}CLS])\\1|(C)C(?!${V})|(${C}S)S|(.S)S(?!${V})|([^I]L)L)`, '$1$2$3$4$5'],
'C-28-bis': [/ILE$/, 'ILLE'],
'C-29': [`(?:(ILS)|([CS]H)|([MN]P)|(R[CFKLNSX])|(${C})${C})$`, '$1$2$3$4$5'],
'C-30': [/^(?:SINT?|SAINT?|SEIN|SEIM|CINQ?)/, 'ST-'],
Expand Down
4 changes: 3 additions & 1 deletion test/phonetics/french/fonem.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ describe('fonem', function() {

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

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

0 comments on commit fec8bdb

Please sign in to comment.