Skip to main content

PyPI version License: CC BY-SA 4.0

CC-CEDICT in Python

To use the CC-CEDICT Chinese to English dictionary in Python.

Installation

pip install pycccedict

Example

  1. Get an entry
from pycccedict.cccedict import CcCedict

cccedict = CcCedict()
cccedict.get_entry('猫')
{
    "traditional": "貓",
    "simplified": "猫",
    "pinyin": "mao1",
    "definitions": [
        "cat",
        "CL:隻|只[zhi1]",
        "(dialect) to hide oneself",
        "(coll.) modem"
    ]
}

API

get_entry

>>> cccedict.get_entry('猫')
{
    "traditional": "貓",
    "simplified": "猫",
    "pinyin": "mao1",
    "definitions": [
        "cat",
        "CL:隻|只[zhi1]",
        "(dialect) to hide oneself",
        "(coll.) modem"
    ]
}

get_entries

>>> cccedict.get_entries()[:2]
[{'traditional': '%', 'simplified': '%', 'pinyin': 'pa1', 'definitions': ['percent (Tw)']}, {'traditional': '2019冠狀病毒病', 'simplified': '2019冠状病毒病', 'pinyin': 'er4 ling2 yi1 jiu3 guan1 zhuang4 bing4 du2 bing4', 'definitions': ['COVID-19, the coronavirus disease identified in 2019']}]

get_traditional

>>> cccedict.get_traditional('猫')
'貓'

get_simplified

>>> cccedict.get_simplified('貓')
'猫'

get_pinyin

>>> cccedict.get_pinyin('猫')
'mao1'

get_definitions

>>> cccedict.get_definitions('猫')
['cat', 'CL:隻|只[zhi1]', '(dialect) to hide oneself', '(coll.) modem']

Metadata

Release files for pycccedict 1.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 pycccedict 1.2.0
File Size Uploaded Provenance
pycccedict-1.2.0.tar.gz 3.8 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.7 MB

Release files / pycccedict-1.2.0.tar.gz

Download URL pycccedict-1.2.0.tar.gz
Size 3.8 MB
Tags Source
SHA-256 checksum
How to use checksums
4d858480ce0dba22507ffcf817bee76a2fd70b6c688ae2bff2035eecb93b9b75
BLAKE2b-256 checksum
How to use checksums
718ce65fc057c0002a317d0f357cf737c74adf6b7e331b5d0af0e41bfe498f95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.10.8 Linux/6.2.0-1015-azure

Release files / pycccedict-1.2.0-py3-none-any.whl

Download URL pycccedict-1.2.0-py3-none-any.whl
Size 3.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a810ca3255516a090f5f9059d6cdb156f86842f579f658a7ae7a84273bcd6326
BLAKE2b-256 checksum
How to use checksums
ffa20a1284e7dde410620f341dffc53a5f6f40f1aa188418fe096fe1411403e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.0 CPython/3.10.8 Linux/6.2.0-1015-azure

Security for pycccedict 1.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.

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