Skip to main content

CMUdict: Python wrapper for cmudict

Latest PyPI version GitHub Workflow Status

CMUdict is a versioned python wrapper package for The CMU Pronouncing Dictionary data files. The main purpose is to expose the data with little or no assumption on how it is to be used.

Installation

cmudict is available on PyPI. Simply install it with pip:

pip install cmudict

Usage

The cmudict data set includes 4 data files: cmudict.dict, cmudict.phones, cmudict.symbols, and cmudict.vp. See The CMU Pronouncing Dictionary for details on the data. Chances are, if you're here, you already know what's in the files.

Each file can be accessed through three functions, one which returns the raw (string) contents, one which returns a binary stream of the file, and one which does minimal processing of the file into an appropriate structure:

>>> import cmudict

>>> cmudict.dict() # Compatible with NLTK
>>> cmudict.dict_string()
>>> cmudict.dict_stream()

>>> cmudict.phones()
>>> cmudict.phones_string()
>>> cmudict.phones_stream()

>>> cmudict.symbols()
>>> cmudict.symbols_string()
>>> cmudict.symbols_stream()

>>> cmudict.vp()
>>> cmudict.vp_string()
>>> cmudict.vp_stream()

Three additional functions are included to maintain compatibility with NLTK: cmudict.entries(), cmudict.raw(), and cmudict.words(). See the nltk.corpus.reader.cmudict documentation for details:

>>> cmudict.entries() # Compatible with NLTK
>>> cmudict.raw() # Compatible with NLTK
>>> cmudict.words() # Compatible with NTLK

And finally, the license for the cmudict data set is available as well:

>>> cmudict.license_string() # Returns the cmudict license as a string

Credits

Built on or modeled after the following open source projects:

Metadata

Release files for cmudict 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmudict 1.1.3
File Size Uploaded
cmudict-1.1.3.tar.gz 935.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmudict 1.1.3
File Interpreter ABI Platform
cmudict-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / cmudict-1.1.3.tar.gz

Download URL cmudict-1.1.3.tar.gz
Size 935.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f6c1cb9a2ffecef387bf1a1b93be6c61c91bc6f41714f183c3eb4d5b3e1ff5f6
BLAKE2b-256 checksum
How to use checksums
d2f3b018f2f31ef7d15956fb343cd48dbb091ffe9e4f5132722f428fc665aa50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure

Release files / cmudict-1.1.3-py3-none-any.whl

Download URL cmudict-1.1.3-py3-none-any.whl
Size 939.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4d421341bf9fa774bcded8e7d6c5d73a1bf8f88edbe129207713850abac4995
BLAKE2b-256 checksum
How to use checksums
fe1c580ae2d5b3eef081305b4b8bd89f7e7945c4d6351c10069ecd2590da1310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.26

2 release files

1.0.24

2 release files

1.0.22

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page