Skip to main content

Lingose

中文

Lingose is an offline English lexicon for Python. Look up pronunciations, word structure and English–Chinese meanings, browse vocabulary lists, or add pronunciation marks to English text.

Requires Python 3.11+. Queries work offline with no third-party runtime dependencies.

The IPSM Approach

The IPSM Approach (Integrated Pronunciation, Spelling and Meaning Approach) connects a word's pronunciation, spelling and meaning to support vocabulary learning. It brings together IPS, which marks pronunciation on the spelling; ISM, which divides a word into morphemes to show its structure; and IPM, which explores links between sound and meaning through listening and speaking. Lingose provides IPA, IPS, ISM, IPSM derived from IPS and ISM, meanings and vocabulary categories for use with the approach.

Install

After 0.3.0 is published to PyPI, install it with:

python -m pip install lingose==0.3.0

Look up a word

Lingose offers four ways to represent a word: IPA for phonetic transcription, IPS for pronunciation marks on its spelling, ISM for morpheme divisions, and IPSM for pronunciation marks combined with those divisions.

import lingose

print(lingose.ipa("apple"))            # ['æpəl']
print(lingose.ips("running"))          # ['rûnning']
print(lingose.ism("running"))          # runn-ing
print(lingose.ipsm("running"))         # ['rûnn-ing']
print(lingose.root_lemma("running"))   # run
print(lingose.meaning("apple", lang="zh"))

The uppercase names IPA(), IPS(), ISM() and IPSM() remain available; the lowercase names are aliases with identical behavior.

Use lang="en" for English meanings. Unavailable pronunciations return []; unavailable meanings and ISM return None.

lookup(word) returns nine fixed keys: word, ipa, ips, ism, ipsm, root_lemma, rank, meaning and labels. Pronunciation fields are single strings or None; meaning always has en and zh. Unknown words keep the input word; other scalars and both meanings are None, with labels=[].

result = lingose.lookup("Apple")
print(result["word"])  # Apple
print(result["ipa"])   # æpəl
print(result["meaning"]["en"])

Annotate text

print(lingose.annotate_ips("Abandon the book."))
# Åbando̊n ṫhe̊ book.

print(lingose.annotate_ips("Abandon the book.", skip_top=1000))
# Åbando̊n the book.

Text keeps its capitalization, spacing and punctuation. Increase skip_top to leave more common words and their inflections unchanged; the default is 0. Words that cannot be converted appear in brackets, such as [unknownword].

Vocabulary lists

print(lingose.kind("apple", "CET4"))   # True
print(lingose.kind_list("CET4")[:10])  # First ten words in the list
print(lingose.labels())               # All available categories

Categories include CET4, CET6, IELTS, TOEFL and Oxford vocabulary lists.

License and credits

CC BY 4.0. Original Lingose data and notation by ZHAN Xianjue, lingose.com.

Data sources and third-party credits are documented in SOURCES.md.

Metadata

Release files for lingose 0.3.0

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

Source distribution (sdist)

Source distribution for lingose 0.3.0
File Size Uploaded Provenance Actions
lingose-0.3.0.tar.gz 6.7 MB Without provenance Details for lingose-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 13.5 MB

Release files / lingose-0.3.0.tar.gz

Download URL lingose-0.3.0.tar.gz
Size 6.7 MB
Tags Source
SHA-256 checksum
How to use checksums
d891ba8713ee79341bca1c08839ec7d9d8e2eb8165e12ecae22ad3cf806625d2
BLAKE2b-256 checksum
How to use checksums
2c8513b208cf32414de434522827e59f6978b1f4856239d06d428bc2a4a30e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / lingose-0.3.0-py3-none-any.whl

Download URL lingose-0.3.0-py3-none-any.whl
Size 6.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0c204c25aadbedb741e78b311dc9404ff40ff32651c29e898fe8d6aedc44ba9f
BLAKE2b-256 checksum
How to use checksums
55244efe232dced01468be2dc241f1a8e7502633ef3799711a1ab6987bcc8af5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Security for lingose 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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