Package nltk :: Package corpus :: Package reader :: Module cmudict :: Class CMUDictCorpusReader
[hide private]
[frames] | no frames]

Class CMUDictCorpusReader

source code

      object --+    
               |    
api.CorpusReader --+
                   |
                  CMUDictCorpusReader

Instance Methods [hide private]
 
entries(self)
Returns: the cmudict lexicon as a list of entries containing (word, identifier, transcription) tuples.
source code
 
raw(self)
Returns: the cmudict lexicon as a raw string.
source code
 
words(self)
Returns: a list of all words defined in the cmudict lexicon.
source code
 
transcriptions(self)
Returns: the cmudict lexicon as a dictionary, whose keys are upper case words and whose values are tuples of pronunciation entries.
source code

Inherited from api.CorpusReader: __init__, __repr__, abspath, abspaths, encoding, files, open

Inherited from api.CorpusReader (private): _get_root

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

    Deprecated since 0.8
 
read(*args, **kwargs) source code
 
dictionary(*args, **kwargs) source code
 
listed(*args, **kwargs) source code
    Deprecated since 0.9.1

Inherited from api.CorpusReader: filenames

Inherited from api.CorpusReader (private): _get_items

Instance Variables [hide private]

Inherited from api.CorpusReader (private): _encoding, _files, _root

Properties [hide private]

Inherited from api.CorpusReader: root

Inherited from object: __class__

    Deprecated since 0.9.1

Inherited from api.CorpusReader: items

Method Details [hide private]

entries(self)

source code 
Returns:
the cmudict lexicon as a list of entries containing (word, identifier, transcription) tuples.

raw(self)

source code 
Returns:
the cmudict lexicon as a raw string.

words(self)

source code 
Returns:
a list of all words defined in the cmudict lexicon.

transcriptions(self)

source code 
Returns:
the cmudict lexicon as a dictionary, whose keys are upper case words and whose values are tuples of pronunciation entries.

read(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .entries() or .transcriptions() instead.")

Deprecated: Use .entries() or .transcriptions() instead.

dictionary(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .transcriptions() instead.")

Deprecated: Use .transcriptions() instead.

listed(*args, **kwargs)

source code 
Decorators:
  • @deprecated("Use .entries() instead.")

Deprecated: Use .entries() instead.