replacement dictionary
REPLACEMENTS = {
'ass': 'association',
'assoc': 'association',
'asso': 'association',
'soc': 'societe',
}
PATTERN_REPLACEMENTS = regex.compile(r'\b(' + '|'.join(REPLACEMENTS.keys()) + r')\b')
PATTERN_REPLACEMENTS.sub(lambda x: REPLACEMENTS[x.group()], text)