'Implements Step 1b from "An algorithm for suffix stripping"
From the paper:
(m>0) EED -> EE                    feed      ->  feed
agreed    ->  agree
(*v*) ED  ->                       plastered ->  plaster
bled      ->  bled
(*v*) ING ->                       motoring  ->  motor
sing      ->  sing
If the second or third of the rules in Step 1b is successful,
the following is done:
AT -> ATE                       conflat(ed)  ->  conflate
BL -> BLE                       troubl(ed)   ->  trouble
IZ -> IZE                       siz(ed)      ->  size
(*d and not (*L or *S or *Z))
-> single letter
hopp(ing)    ->  hop
tann(ed)     ->  tan
fall(ing)    ->  fall
hiss(ing)    ->  hiss
fizz(ed)     ->  fizz
(m=1 and *o) -> E               fail(ing)    ->  fail
fil(ing)     ->  file
The rule to map to a single letter causes the removal of one of
the double letter pair. The -E is put back on -AT, -BL and -IZ,
so that the suffixes -ATE, -BLE and -IZE can be recognised
later. This E may be removed in step 4.'

def _step1b(self, word):

    if (self.mode == self.NLTK_EXTENSIONS):
        if word.endswith(u'ied'):
            if (len(word) == 4):
                return self._replace_suffix(word, u'ied', u'ie')
            else:
                return self._replace_suffix(word, u'ied', u'i')
    if word.endswith(u'eed'):
        stem = self._replace_suffix(word, u'eed', u'')
        if (self._measure(stem) > 0):
            return (stem + u'ee')
        else:
            return word
    rule_2_or_3_succeeded = False
    for suffix in [u'ed', u'ing']:
        if word.endswith(suffix):
            intermediate_stem = self._replace_suffix(word, suffix, u'')
            if self._contains_vowel(intermediate_stem):
                rule_2_or_3_succeeded = True
                break
    if (not rule_2_or_3_succeeded):
        return word
    return self._apply_rule_list(intermediate_stem, [(u'at', u'ate', None), (u'bl', u'ble', None), (u'iz', u'ize', None), (u'*d', intermediate_stem[(-1)], (lambda stem: (intermediate_stem[(-1)] not in (u'l', u's', u'z')))), (u'', u'e', (lambda stem: ((self._measure(stem) == 1) and self._ends_cvc(stem))))])
