Module characterProcessing
[hide private]
[frames] | no frames]

Module characterProcessing

source code

Classes [hide private]
  LocaleDataMap
Allows access to locale-specific data objects, dynamically loading them if needed on request
  CharacterDescriptions
Represents a map of characters to one or more descriptions (examples) for that character.
  SpeechSymbol
  SpeechSymbols
Contains raw information about the pronunciation of symbols.
  SpeechSymbolProcessor
Handles processing of symbol pronunciation for a locale.
Functions [hide private]
list of strings
getCharacterDescription(locale, character)
Finds a description or examples for the given character, which makes sence in the given locale.
source code
 
_getSpeechSymbolsForLocale(locale) source code
 
processSpeechSymbols(locale, text, level)
Process some text, converting symbols according to desired pronunciation.
source code
 
processSpeechSymbol(locale, symbol)
Process a single symbol according to desired pronunciation.
source code
Variables [hide private]
  _charDescLocaleDataMap = LocaleDataMap(CharacterDescriptions)
  SYMLVL_NONE = 0
  SYMLVL_SOME = 100
  SYMLVL_MOST = 200
  SYMLVL_ALL = 300
  SYMLVL_CHAR = 1000
  SPEECH_SYMBOL_LEVEL_LABELS = {SYMLVL_NONE: _("none"), SYMLVL_S...
  CONFIGURABLE_SPEECH_SYMBOL_LEVELS = SYMLVL_NONE, SYMLVL_SOME, ...
  SPEECH_SYMBOL_LEVELS = CONFIGURABLE_SPEECH_SYMBOL_LEVELS+(SYML...
  SYMPRES_NEVER = 0
  SYMPRES_ALWAYS = 1
  SYMPRES_NOREP = 2
  _localeSpeechSymbolProcessors = LocaleDataMap(SpeechSymbolProc...
Function Details [hide private]

getCharacterDescription(locale, character)

source code 

Finds a description or examples for the given character, which makes sence in the given locale.

Parameters:
  • locale (string) - the locale (language[_COUNTRY]) the description should be for.
  • character (string) - the character who's description should be retreaved.
Returns: list of strings
the found description for the given character

processSpeechSymbols(locale, text, level)

source code 

Process some text, converting symbols according to desired pronunciation.

Parameters:
  • locale (str) - The locale of the text.
  • text (str) - The text to process.
  • level - The symbol level to use; one of the SYMLVL_* constants.

processSpeechSymbol(locale, symbol)

source code 

Process a single symbol according to desired pronunciation.

Parameters:
  • locale (str) - The locale of the symbol.
  • symbol (str) - The symbol.

Variables Details [hide private]

SPEECH_SYMBOL_LEVEL_LABELS

Value:
{SYMLVL_NONE: _("none"), SYMLVL_SOME: _("some"), SYMLVL_MOST: _("most"\
), SYMLVL_ALL: _("all"), SYMLVL_CHAR: _("character"),}

CONFIGURABLE_SPEECH_SYMBOL_LEVELS

Value:
SYMLVL_NONE, SYMLVL_SOME, SYMLVL_MOST, SYMLVL_ALL

SPEECH_SYMBOL_LEVELS

Value:
CONFIGURABLE_SPEECH_SYMBOL_LEVELS+(SYMLVL_CHAR,)

_localeSpeechSymbolProcessors

Value:
LocaleDataMap(SpeechSymbolProcessor)