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.1.0 from PyPI after release:

python -m pip install lingose==0.1.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 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.1.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.1.0
File Size Uploaded Provenance Actions
lingose-0.1.0.tar.gz 90.3 MB Without provenance Details for lingose-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 180.5 MB

Release files / lingose-0.1.0.tar.gz

Download URL lingose-0.1.0.tar.gz
Size 90.3 MB
Tags Source
SHA-256 checksum
How to use checksums
fb04bd61e92c13e527479254360887b6589405219a350c1ac296a56390f9d839
BLAKE2b-256 checksum
How to use checksums
46d8efc89ea02c80f0fd8e0c17daadfca61dcc05ed50350ed52c584ac5a69ea5
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.1.0-py3-none-any.whl

Download URL lingose-0.1.0-py3-none-any.whl
Size 90.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e6c58a612b0281c976dba8a2183deefd554a034ec78efc0b0db069e51f938cdc
BLAKE2b-256 checksum
How to use checksums
986c66cf9e3770c76080b79a5fa75a2fc69ee91afef2990e0a9b5251b611ae83
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.1.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