From 0b590c5f34d108690e52883b2c3e1b2f778f2bb5 Mon Sep 17 00:00:00 2001 From: Autumn Smith Date: Mon, 25 Mar 2019 20:28:51 -0700 Subject: [PATCH] Fix `wednesday`, `some` prefixes Closes GH-27. Closes GH-28. Reviewed-by: Wilson Ng Reviewed-by: Titus Wormer --- index.js | 6 ++++-- problematic.json | 21 +++++++++++---------- test/fixture.json | 31 +++++++++++++++++++------------ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/index.js b/index.js index ef2487a..af7633a 100644 --- a/index.js +++ b/index.js @@ -157,7 +157,8 @@ var EXPRESSION_SINGLE = new RegExp( 'pre', 'pro', 'dis', - 'side' + 'side', + 'some' ].join('|') + ')', '(?:' + @@ -210,7 +211,8 @@ var EXPRESSION_DOUBLE = new RegExp( 'kilo', 'pico', 'nano', - 'macro' + 'macro', + 'somer' ].join('|') + ')', '(?:' + ['fully', 'berry', 'woman', 'women', 'edly'].join('|') + ')$' diff --git a/problematic.json b/problematic.json index 9eb3045..ede4ff9 100644 --- a/problematic.json +++ b/problematic.json @@ -1,10 +1,10 @@ { "abalone": 4, "abare": 3, - "abed": 2, - "abruzzese": 4, "abbruzzese": 4, + "abed": 2, "aborigine": 5, + "abruzzese": 4, "acreage": 3, "adame": 3, "adieu": 2, @@ -21,12 +21,16 @@ "chloe": 2, "circe": 2, "coyote": 3, + "daphne": 2, "epitome": 4, + "eurydice": 4, + "euterpe": 3, "every": 2, "everywhere": 3, "forever": 3, "gethsemane": 4, "guacamole": 4, + "hermione": 4, "hyperbole": 4, "jesse": 2, "jukebox": 2, @@ -34,7 +38,10 @@ "machete": 3, "maybe": 2, "newlywed": 3, + "penelope": 4, "people": 2, + "persephone": 4, + "phoebe": 2, "pulse": 1, "queue": 1, "recipe": 3, @@ -46,14 +53,8 @@ "sometimes": 2, "syncope": 3, "tamale": 3, - "yosemite": 4, - "daphne": 2, - "eurydice": 4, - "euterpe": 3, - "hermione": 4, - "penelope": 4, - "persephone": 4, - "phoebe": 2, "waterbed": 3, + "wednesday": 2, + "yosemite": 4, "zoe": 2 } diff --git a/test/fixture.json b/test/fixture.json index bc3381f..f2e6610 100644 --- a/test/fixture.json +++ b/test/fixture.json @@ -1,4 +1,6 @@ { + "'tis": 1, + "'twas": 1, "abalone": 4, "abare": 3, "abatement": 3, @@ -1890,10 +1892,12 @@ "hyperion": 4, "hypotheses": 4, "hyraxes": 3, + "I'd": 1, + "I'm": 1, + "I've": 1, "ianniello": 5, "ices": 2, "iconoclasm": 5, - "I'd": 1, "idea": 3, "ideological": 6, "ideologies": 5, @@ -1905,7 +1909,6 @@ "ignace": 2, "illes": 1, "Ilyich": 2, - "I'm": 1, "image": 2, "images": 3, "imbalances": 4, @@ -2004,7 +2007,6 @@ "Isozaki": 4, "issuances": 4, "itches": 2, - "I've": 1, "jacksonville": 3, "jandreau": 2, "janelle": 2, @@ -2553,8 +2555,8 @@ "midgette": 2, "midpriced": 2, "miesse": 1, - "migneault": 2, "might've": 2, + "migneault": 2, "milbourne": 2, "mildred": 2, "mileage": 2, @@ -3272,12 +3274,12 @@ "rayos": 2, "rayovac": 3, "raytheon": 3, - "reabsorbed": 3, "reabsorbe": 3, + "reabsorbed": 3, + "react": 2, "reactionaries": 5, "reactionary": 5, "reactions": 3, - "react": 2, "reaganesque": 3, "realign": 3, "realigned": 3, @@ -3297,8 +3299,8 @@ "realtor": 3, "realtors": 3, "realty": 3, - "reappraised": 3, "reappraise": 3, + "reappraised": 3, "reaume": 1, "reaux": 1, "rebounded": 3, @@ -3316,8 +3318,8 @@ "reduces": 3, "reemerge": 3, "reemerged": 3, - "reestablished": 4, "reestablish": 4, + "reestablished": 4, "referenced": 3, "references": 4, "refering": 3, @@ -3332,8 +3334,8 @@ "refunded": 3, "refuses": 3, "regarded": 3, - "reimposed": 3, "reimpose": 3, + "reimposed": 3, "rejiggering": 4, "rejoice": 2, "rejoiced": 2, @@ -3420,8 +3422,8 @@ "retracement": 3, "retrenched": 2, "retroviruses": 5, - "reused": 2, "reuse": 2, + "reused": 2, "revelle": 2, "revette": 2, "reville": 2, @@ -3756,6 +3758,12 @@ "soldiering": 3, "solve": 1, "solves": 1, + "some": 1, + "somebodies": 3, + "someone": 2, + "somersault": 3, + "somersets": 3, + "somersetting": 4, "somerville": 3, "sometimes": 2, "sommerville": 3, @@ -4011,7 +4019,6 @@ "tilles": 1, "timme": 1, "tinkled": 2, - "'tis": 1, "tithe": 1, "titusville": 3, "toa": 2, @@ -4097,7 +4104,6 @@ "turville": 2, "tussled": 2, "tutelage": 3, - "'twas": 1, "twelve": 1, "twitches": 2, "udelle": 2, @@ -4309,6 +4315,7 @@ "waynesville": 2, "wedded": 2, "wedges": 2, + "wednesday": 2, "weisse": 1, "welborne": 2, "welded": 2,