def expand_exc(excs, search, replace):
def _fix_token(token, search, replace):<EOL><INDENT>fixed = dict(token)<EOL>fixed[ORTH] = fixed[ORTH].replace(search, replace)<EOL>return fixed<EOL><DEDENT>new_excs = dict(excs)<EOL>for token_string, tokens in excs.items():<EOL><INDENT>if search in token_string:<EOL><INDENT>new_key = token_string.replace(search, replace)<EOL>new_value = [_fix_token(t, search, replace) for t in tokens]<EOL>new_excs[new_key] = new_value<EOL><DEDENT><DEDENT>return new_excs<EOL>
Find string in tokenizer exceptions, duplicate entry and replace string.
    For example, to add additional versions with typographic apostrophes.

    excs (dict): Tokenizer exceptions.
    search (unicode): String to find and replace.
    replace (unicode): Replacement.
    RETURNS (dict): Combined tokenizer exceptions.