Mini Shell

Direktori : /lib/python3.6/site-packages/orca/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/orca/__pycache__/pronunciation_dict.cpython-36.pyc

3

�2[l
�@s4dZdZdZdZdZdZddd�Zdd	d
�ZiZdS)
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.ZLGPLNcCs(|j�}|pt}|j|||g�}|dS)ayGiven 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�getPronunciationsr
cCs.|j�}|dk	r||g||<n||gt|<dS)a9Given an actual word, and a replacement string, set a key/value
    pair in a pronunciation dictionary.

    Arguments:
    - word: the word to be pronunced.
    - replacementString: the replacement string to use instead.
    - pronunciations: an optional dictionary used to set the pronunciation
      into.
    N)rr)rZreplacementStringr�keyrrr	�setPronunciation4sr)N)N)	�__doc__Z__id__�__version__Z__date__Z
__copyright__Z__license__r
rrrrrr	�<module>s