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

Install version 0.2.0 from PyPI after release:

python -m pip install lingose==0.2.0

For building from source, see the maintenance guide.

The complete lexicon is compressed in the package. The first query restores it offline to a user cache; allow about 1.5 GB of free disk space and time for this initial preparation. Later queries reuse the database. Set LINGOSE_CACHE_DIR before starting Python to choose another cache location. Importing the package alone does not restore data.

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"))

Use lang="en" for English meanings. lookup(word) returns the full entry, including parts of speech and sources. Unavailable pronunciations return []; unavailable meanings and ISM return None.

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. See the API reference for all functions and return values.

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.2.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.2.0
File Size Uploaded Provenance Actions
lingose-0.2.0.tar.gz 90.3 MB Without provenance Details for lingose-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 180.5 MB

Release files / lingose-0.2.0.tar.gz

Download URL lingose-0.2.0.tar.gz
Size 90.3 MB
Tags Source
SHA-256 checksum
How to use checksums
8db1731914a29467d6d2a04d2269bd0006f93af046fc6d53a6b0e738d1b8e73e
BLAKE2b-256 checksum
How to use checksums
e255ea00bc089a251f38dd88e4c0411b7e1d2833469e647faae92f2fce98846e
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.2.0-py3-none-any.whl

Download URL lingose-0.2.0-py3-none-any.whl
Size 90.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d518454a76056a23b99af294a9ae43236cfcedf6633b407219530e5a54670428
BLAKE2b-256 checksum
How to use checksums
4acc24bf2f96dbda76ec14b69c3f842910fbdd146c1335c9811b5f36d51fc895
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.2.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