| Home | Trees | Index | Help |
|
|---|
| Package pyTTS :: Module Pronounce :: Class Pronounce |
|
object --+
|
Pronounce
| Method Summary | |
|---|---|
Initialize an instance of the class. | |
| boolean |
Add a mispelling of a word as a correction to the the dictionary. |
| boolean |
Add a phonetic pronunciation to the dictionary. |
| string |
Parse a text string and correct it for pronunciation according to the rules of the currently loaded dictionary. |
Correct the given word with the given pronunciation immediately. (Class method) | |
| 2-tuple of int, string |
Return pronunciation text and type associated with the given word |
| list |
Return all words in the dictionary |
Start a new dictionary. | |
Load a dictionary from disk. | |
Remove a word from the dictionary. | |
Save a dictionary to disk. | |
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
| |
| Instance Variable Summary | |
|---|---|
| dictionary | dictionary: Dictionary of words and their correction/correction type pairings |
| Translator | trans: Parser that replaces words with their corrections if found |
| Instance Method Details |
|---|
__init__(self,
filename=None)
Initialize an instance of the class. Load a dictionary immediately
from a file if on is given.
|
AddMisspelled(self, word, pron)Add a mispelling of a word as a correction to the the dictionary.
|
AddPhonetic(self, word, pron)Add a phonetic pronunciation to the dictionary. See the SAPI documentation for allowed phonetic symbols and stress marks.
|
Correct(self, text)Parse a text string and correct it for pronunciation according to the rules of the currently loaded dictionary.
|
GetPronunciation(self, word)
|
ListWords(self)
|
New(self)Start a new dictionary. |
Open(self, filename)Load a dictionary from disk.
|
RemoveWord(self, word)Remove a word from the dictionary.
|
Save(self, filename)Save a dictionary to disk.
|
| Class Method Details |
|---|
CorrectNow(cls, word, pron, type=0)Correct the given word with the given pronunciation immediately.
|
| Instance Variable Details |
|---|
dictionaryDictionary of words and their correction/correction type pairings
|
transParser that replaces words with their corrections if found
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Fri Feb 18 13:59:27 2005 | http://epydoc.sf.net |