cmudict


Namecmudict JSON
Version 1.0.23 PyPI version JSON
download
home_pagehttps://github.com/prosegrinder/python-cmudict
SummaryA versioned python wrapper package for The CMU Pronouncing Dictionary data files.
upload_time2024-04-04 10:35:16
maintainerNone
docs_urlNone
authorDavid L. Day
requires_python<4.0,>=3.8
licenseGPL-3.0-or-later
keywords cmudict
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CMUdict: Python wrapper for cmudict

[![Latest PyPI version](https://img.shields.io/pypi/v/cmudict.svg)](https://pypi.python.org/pypi/cmudict)
[![GitHub Workflow Status](https://github.com/prosegrinder/python-cmudict/workflows/Python%20CI/badge.svg?branch=main)](https://github.com/prosegrinder/python-cmudict/actions?query=workflow%3A%22Python+CI%22+branch%3Amain)

CMUdict is a versioned python wrapper package for
[The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict) 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`:

```bash
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](https://github.com/cmusphinx/cmudict) 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:

```python
>>> 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](http://www.nltk.org/_modules/nltk/corpus/reader/cmudict.html)
documentation for details:

```python
>>> 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:

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

## Credits

Built on or modeled after the following open source projects:

- [The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict)
- [NLTK](https://github.com/nltk/nltk)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/prosegrinder/python-cmudict",
    "name": "cmudict",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "cmudict",
    "author": "David L. Day",
    "author_email": "david@davidlday.com",
    "download_url": "https://files.pythonhosted.org/packages/4a/7e/f4e9e998e3f85f5cb245dd1dbee93feb8c15454b09149250348cd679ff47/cmudict-1.0.23.tar.gz",
    "platform": null,
    "description": "# CMUdict: Python wrapper for cmudict\n\n[![Latest PyPI version](https://img.shields.io/pypi/v/cmudict.svg)](https://pypi.python.org/pypi/cmudict)\n[![GitHub Workflow Status](https://github.com/prosegrinder/python-cmudict/workflows/Python%20CI/badge.svg?branch=main)](https://github.com/prosegrinder/python-cmudict/actions?query=workflow%3A%22Python+CI%22+branch%3Amain)\n\nCMUdict is a versioned python wrapper package for\n[The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict) data\nfiles. The main purpose is to expose the data with little or no assumption on\nhow it is to be used.\n\n## Installation\n\n`cmudict` is available on PyPI. Simply install it with `pip`:\n\n```bash\npip install cmudict\n```\n\n## Usage\n\nThe cmudict data set includes 4 data files: cmudict.dict, cmudict.phones,\ncmudict.symbols, and cmudict.vp. See\n[The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict) for\ndetails on the data. Chances are, if you're here, you already know what's in the\nfiles.\n\nEach file can be accessed through three functions, one which returns the raw\n(string) contents, one which returns a binary stream of the file, and one which\ndoes minimal processing of the file into an appropriate structure:\n\n```python\n>>> import cmudict\n\n>>> cmudict.dict() # Compatible with NLTK\n>>> cmudict.dict_string()\n>>> cmudict.dict_stream()\n\n>>> cmudict.phones()\n>>> cmudict.phones_string()\n>>> cmudict.phones_stream()\n\n>>> cmudict.symbols()\n>>> cmudict.symbols_string()\n>>> cmudict.symbols_stream()\n\n>>> cmudict.vp()\n>>> cmudict.vp_string()\n>>> cmudict.vp_stream()\n```\n\nThree additional functions are included to maintain compatibility with NLTK:\ncmudict.entries(), cmudict.raw(), and cmudict.words(). See the\n[nltk.corpus.reader.cmudict](http://www.nltk.org/_modules/nltk/corpus/reader/cmudict.html)\ndocumentation for details:\n\n```python\n>>> cmudict.entries() # Compatible with NLTK\n>>> cmudict.raw() # Compatible with NLTK\n>>> cmudict.words() # Compatible with NTLK\n```\n\nAnd finally, the license for the cmudict data set is available as well:\n\n```python\n>>> cmudict.license_string() # Returns the cmudict license as a string\n```\n\n## Credits\n\nBuilt on or modeled after the following open source projects:\n\n- [The CMU Pronouncing Dictionary](https://github.com/cmusphinx/cmudict)\n- [NLTK](https://github.com/nltk/nltk)\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "A versioned python wrapper package for The CMU Pronouncing Dictionary data files.",
    "version": "1.0.23",
    "project_urls": {
        "Homepage": "https://github.com/prosegrinder/python-cmudict",
        "Repository": "https://github.com/prosegrinder/python-cmudict"
    },
    "split_keywords": [
        "cmudict"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6503c76ccb02326b7a1af4513a1623546c100af02b0ef56cc45c3f40e679e7a3",
                "md5": "704e0b0cdac916b1d5135246af2e4bd4",
                "sha256": "a6b933bd5777afafb18ea5d4989c24f326bf4076b12f49f8d5de5177b7b173a6"
            },
            "downloads": -1,
            "filename": "cmudict-1.0.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "704e0b0cdac916b1d5135246af2e4bd4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 939424,
            "upload_time": "2024-04-04T10:35:14",
            "upload_time_iso_8601": "2024-04-04T10:35:14.120694Z",
            "url": "https://files.pythonhosted.org/packages/65/03/c76ccb02326b7a1af4513a1623546c100af02b0ef56cc45c3f40e679e7a3/cmudict-1.0.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a7ef4e9e998e3f85f5cb245dd1dbee93feb8c15454b09149250348cd679ff47",
                "md5": "ac74d81e1bb38ef6dd58b5182fb3b28f",
                "sha256": "a1f53a140f867a62ce10e344df082be0cb4bb6b8fbaa63f4c9c6ae13db501b8c"
            },
            "downloads": -1,
            "filename": "cmudict-1.0.23.tar.gz",
            "has_sig": false,
            "md5_digest": "ac74d81e1bb38ef6dd58b5182fb3b28f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 935978,
            "upload_time": "2024-04-04T10:35:16",
            "upload_time_iso_8601": "2024-04-04T10:35:16.848012Z",
            "url": "https://files.pythonhosted.org/packages/4a/7e/f4e9e998e3f85f5cb245dd1dbee93feb8c15454b09149250348cd679ff47/cmudict-1.0.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 10:35:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "prosegrinder",
    "github_project": "python-cmudict",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cmudict"
}
        
Elapsed time: 0.31591s