syllabify


Namesyllabify JSON
Version 0.4.1 PyPI version JSON
download
home_pageNone
SummaryAutomatically convert plain text into phonemes (US English pronunciation) and syllabify
upload_time2025-08-10 18:08:27
maintainerNone
docs_urlNone
authorFong-Chun Tsai
requires_python>=3.9
licenseMIT
keywords phonetics syllabification linguistics cmu pronunciation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Syllabify

[![PyPI](https://img.shields.io/pypi/v/syllabify.svg)](https://pypi.org/project/syllabify/)
[![Python 3.x](https://img.shields.io/pypi/pyversions/syllabify.svg?logo=python&logoColor=white)](https://pypi.org/project/syllabify/)
[![License](https://img.shields.io/github/license/eoleedi/TimeTree-Exporter)](https://github.com/eoleedi/TimeTree-Exporter/blob/main/LICENSE)

Automatically convert plain text into phonemes (US English pronunciation) and syllabify.

Modified from [the repository](https://github.com/cainesap/syllabify) set up by Andrew Caines with some key changes, itemised below:

- Environment management using Poetry
- Python 3.9+ compatibility
- Easy to access class and function interfaces

## Set up

Requires [Python 3](https://www.python.org/downloads) (Anthony Evans used Python 2: if that's what you prefer, see his repo).

```bash
pip install syllabify
```

## Usage

### Package interface

```python
from syllabify import syllabify
word = syllabify("linguistics")
print(word)
```

```text
L IH0 NG {onset: L, nucleus: IH0, coda: NG}
G W IH1 {onset: GW, nucleus: IH1, coda: empty}
S T IH0 K S {onset: ST, nucleus: IH0, coda: KS}
```

You can get the onset, nucleus, and coda of each syllable:

```python
from syllabify import syllabify

word = syllabify("linguistics")
for syllable in word.syllables:
    print(f"Onset: {syllable.onset}")
    print(f"Nucleus: {syllable.nucleus}")
    print(f"Coda: {syllable.coda}")
```

```text
Onset: L
Nucleus: IH0
Coda: NG
Onset: GW
Nucleus: IH1
Coda: empty
Onset: ST
Nucleus: IH0
Coda: KS
```

### Command line interface

One word at a time:

```bash
syllabify linguistics
```

```text
πŸ“ Input: linguistics
πŸ”€ Syllabification:

LIH0NG [L.IH0.NG] | ˈGWIH1 [GW.IH1.βˆ…] | STIH0KS [ST.IH0.KS]

πŸ“– Legend:
  [onset.nucleus.coda] = syllable structure
  βˆ… = empty position
  ˈ = primary stress
  ˌ = secondary stress
  | = syllable boundary
```

Or several (space-separated):

```bash
syllabify colorless green ideas
```

```text
πŸ“ Input: colorless green ideas
πŸ”€ Syllabification:

  ˈKAH1 [K.AH1.βˆ…] | LER0 [L.ER0.βˆ…] | LAH0S [L.AH0.S]
  ˈGRIY1N [GR.IY1.N]
  AY0 [βˆ….AY0.βˆ…] | ˈDIY1 [D.IY1.βˆ…] | AH0Z [βˆ….AH0.Z]

πŸ“– Legend:
  [onset.nucleus.coda] = syllable structure
  βˆ… = empty position
  ˈ = primary stress
  ˌ = secondary stress
  | = syllable boundary
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "syllabify",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "phonetics, syllabification, linguistics, cmu, pronunciation",
    "author": "Fong-Chun Tsai",
    "author_email": "eoleedimin@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/54/fc/d51e23208a02667309152ad65ac0446bed405dbe20eb1e30ab5487f518b4/syllabify-0.4.1.tar.gz",
    "platform": null,
    "description": "# Syllabify\n\n[![PyPI](https://img.shields.io/pypi/v/syllabify.svg)](https://pypi.org/project/syllabify/)\n[![Python 3.x](https://img.shields.io/pypi/pyversions/syllabify.svg?logo=python&logoColor=white)](https://pypi.org/project/syllabify/)\n[![License](https://img.shields.io/github/license/eoleedi/TimeTree-Exporter)](https://github.com/eoleedi/TimeTree-Exporter/blob/main/LICENSE)\n\nAutomatically convert plain text into phonemes (US English pronunciation) and syllabify.\n\nModified from [the repository](https://github.com/cainesap/syllabify) set up by Andrew Caines with some key changes, itemised below:\n\n- Environment management using Poetry\n- Python 3.9+ compatibility\n- Easy to access class and function interfaces\n\n## Set up\n\nRequires [Python 3](https://www.python.org/downloads) (Anthony Evans used Python 2: if that's what you prefer, see his repo).\n\n```bash\npip install syllabify\n```\n\n## Usage\n\n### Package interface\n\n```python\nfrom syllabify import syllabify\nword = syllabify(\"linguistics\")\nprint(word)\n```\n\n```text\nL IH0 NG {onset: L, nucleus: IH0, coda: NG}\nG W IH1 {onset: GW, nucleus: IH1, coda: empty}\nS T IH0 K S {onset: ST, nucleus: IH0, coda: KS}\n```\n\nYou can get the onset, nucleus, and coda of each syllable:\n\n```python\nfrom syllabify import syllabify\n\nword = syllabify(\"linguistics\")\nfor syllable in word.syllables:\n    print(f\"Onset: {syllable.onset}\")\n    print(f\"Nucleus: {syllable.nucleus}\")\n    print(f\"Coda: {syllable.coda}\")\n```\n\n```text\nOnset: L\nNucleus: IH0\nCoda: NG\nOnset: GW\nNucleus: IH1\nCoda: empty\nOnset: ST\nNucleus: IH0\nCoda: KS\n```\n\n### Command line interface\n\nOne word at a time:\n\n```bash\nsyllabify linguistics\n```\n\n```text\n\ud83d\udcdd Input: linguistics\n\ud83d\udd24 Syllabification:\n\nLIH0NG [L.IH0.NG] | \u02c8GWIH1 [GW.IH1.\u2205] | STIH0KS [ST.IH0.KS]\n\n\ud83d\udcd6 Legend:\n  [onset.nucleus.coda] = syllable structure\n  \u2205 = empty position\n  \u02c8 = primary stress\n  \u02cc = secondary stress\n  | = syllable boundary\n```\n\nOr several (space-separated):\n\n```bash\nsyllabify colorless green ideas\n```\n\n```text\n\ud83d\udcdd Input: colorless green ideas\n\ud83d\udd24 Syllabification:\n\n  \u02c8KAH1 [K.AH1.\u2205] | LER0 [L.ER0.\u2205] | LAH0S [L.AH0.S]\n  \u02c8GRIY1N [GR.IY1.N]\n  AY0 [\u2205.AY0.\u2205] | \u02c8DIY1 [D.IY1.\u2205] | AH0Z [\u2205.AH0.Z]\n\n\ud83d\udcd6 Legend:\n  [onset.nucleus.coda] = syllable structure\n  \u2205 = empty position\n  \u02c8 = primary stress\n  \u02cc = secondary stress\n  | = syllable boundary\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Automatically convert plain text into phonemes (US English pronunciation) and syllabify",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/eoleedi/syllabify",
        "Repository": "https://github.com/eoleedi/syllabify"
    },
    "split_keywords": [
        "phonetics",
        " syllabification",
        " linguistics",
        " cmu",
        " pronunciation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d18a979a26e80ecbf2b90c6ddcc36268bbbf5f946d4d65471415fd03737518b1",
                "md5": "a10eb97a6a132b777212a18950a926dc",
                "sha256": "76725d27e8d15b11ab475103706382b3230d43564148a15ecdecbea00bdcf0d9"
            },
            "downloads": -1,
            "filename": "syllabify-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a10eb97a6a132b777212a18950a926dc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 921836,
            "upload_time": "2025-08-10T18:08:25",
            "upload_time_iso_8601": "2025-08-10T18:08:25.649673Z",
            "url": "https://files.pythonhosted.org/packages/d1/8a/979a26e80ecbf2b90c6ddcc36268bbbf5f946d4d65471415fd03737518b1/syllabify-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "54fcd51e23208a02667309152ad65ac0446bed405dbe20eb1e30ab5487f518b4",
                "md5": "9bd4f0ef61bd4f8ff9107e1d38d14b1a",
                "sha256": "b5c0391e5e24b1444a3a0bdd18004eba5ffb8b64b6b8bd1c009cc2fc287d1681"
            },
            "downloads": -1,
            "filename": "syllabify-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9bd4f0ef61bd4f8ff9107e1d38d14b1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 916005,
            "upload_time": "2025-08-10T18:08:27",
            "upload_time_iso_8601": "2025-08-10T18:08:27.703829Z",
            "url": "https://files.pythonhosted.org/packages/54/fc/d51e23208a02667309152ad65ac0446bed405dbe20eb1e30ab5487f518b4/syllabify-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 18:08:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "eoleedi",
    "github_project": "syllabify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "syllabify"
}
        
Elapsed time: 0.78821s