Skip to content

Commit

Permalink
Implement two patterns us --> uk
Browse files Browse the repository at this point in the history
The second set added is parallel to the immediately above but is missing the 'd' on purpose (otherwise a wide number of words that shouldn't match do - e.g. 'ambassador').
Causes misses on some words (e.g. 'odor').
  • Loading branch information
jeffreypriebe committed Jun 25, 2017
1 parent f7ab7c4 commit 1ddad07
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/pattern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,27 @@ const patterns:ReplacementPattern[] = [
replacementString:"eled"
},

{
regex:/eled$/,
originalIndex:[4],
replacementIndex:[0,5],
replacementString:"elled"
},

{
regex:/([cpviglnbmd])(our)(ed$|ing$|s$|al$|ally$|ful$|$)/,
originalIndex:[0],
replacementIndex:[4],
replacementString:"$1or$3"
},

{
regex:/([cpviglnbm])(or)(ed$|ing$|s$|al$|ally$|ful$|$)/,
originalIndex:[4],
replacementIndex:[0],
replacementString:"$1our$3"
},

{
regex:/(v|m|b|l|d|i|n|c|g|p)our/,
originalIndex:[0,5],
Expand Down

0 comments on commit 1ddad07

Please sign in to comment.