Mini Shell
3
�2[l
� @ s4 d Z dZdZdZdZdZddd�Zdd d
�Zi ZdS )
zRExposes a dictionary, pronunciation_dict, that maps words to what
they sound like.z$Id$z
$Revision$z$Date$z-Copyright (c) 2006-2008 Sun Microsystems Inc.ZLGPLNc C s( | j � }|pt}|j|| | g�}|d S )ay Given a word, return a string that represents what this word
sounds like. Note: This code does not handle the pronunciation
of character names. If you want a character name to be spoken,
treat it as a punctuation character at LEVEL_NONE in
punctuation_settings.py. See, for example, the left_arrow and
right_arrow characters.
Arguments:
- word: the word to get the "sounds like" representation for.
- pronunciations: an optional dictionary used to get the pronunciation
from.
Returns a string that represents what this word sounds like, or
the word if there is no representation.
� )�lower�pronunciation_dict�get)�word�pronunciationsZ lowerWordZ
dictionary�entry� r �(/usr/lib/python3.6/pronunciation_dict.py�getPronunciation s r
c C s. | j � }|dk r| |g||<