trftools.dictionaries.fix_apostrophe_pronounciations

trftools.dictionaries.fix_apostrophe_pronounciations(dictionary, keep=())

Update a pronunciation dictionary: add affixes and remove any other words with apostrophe

Parameters:
  • dictionary (Dict[str, Set[str]]) – Pronunciations; will be modified in-place.

  • keep (Collection[str]) – Keep these words with apostrophe (e.g., ("'EM", "O'CLOCK")).

Return type:

None