Skip to main content

API for Cilin

Project description

Cilin

Install

pip install cilin

Usage

from cilin import Cilin

C = Cilin(trad=False)  # trad=True to convert results to traditional Chinese

# Category label
>>> C.get_tag('A')
'人'
>>> C.get_tag('Aa')
'人-泛称'
>>> C.get_tag('Aa01')
'人 人民 众人 角色'

# Terms under a certain category
>>> C.get_members('Ca01B')
{'己巳', '回历', '戊辰', '丙寅', '太阴历', '子丑寅卯', '庚午', '地支', '乙丑', '夏历', '甲午', '旧历', '天干', '巳', '子午卯酉', '阴历', '戊寅', '戊戌', '伊斯兰教历', '丁卯', '农历', '庚子', '庚申', '癸', '辛未', '辛亥'}
>>> C.get_members('Ca01B01=')
{'旧历', '农历', '太阴历', '阴历', '夏历'}

# Divide terms into categories at different levels (1-5)
>>> C.category_split(level=1)
{
    'A': {'荷兰人', '巡视员', '人夫', '农妇', '王子', ...},
    'B': {'赌具', '湖', '敞篷车', '灰黄色', '圆桌', ...},
    ...
    'L': {'费心', '失敬', '劳神', '恭贺', '借问', ...}
}

Acknowledgent

同義詞詞林資料:https://github.com/yaleimeng/Final_word_Similarity/tree/master/cilin/V3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cilin-0.0.3.tar.gz (599.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cilin-0.0.3-py3-none-any.whl (600.1 kB view details)

Uploaded Python 3

File details

Details for the file cilin-0.0.3.tar.gz.

File metadata

  • Download URL: cilin-0.0.3.tar.gz
  • Upload date:
  • Size: 599.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0

File hashes

Hashes for cilin-0.0.3.tar.gz
Algorithm Hash digest
SHA256 71e2bc5894e8fb0e6b37c51a884064dbc3ec2683c602f15bb34619a7f2a0e01f
MD5 76f6953713ee380b50afd513d2fc1b81
BLAKE2b-256 ca300a7378aaba5eb47d0e9016079b93a48d0ce6358d698498ad200a546b2dd3

See more details on using hashes here.

File details

Details for the file cilin-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: cilin-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 600.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0

File hashes

Hashes for cilin-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 40c320e0658d7ddb0db934350e684edcca1901b09c569e632176f8b2e102a654
MD5 fe5206961280d5cb8114fa3ab79d10df
BLAKE2b-256 d5823dd4bbcbfbc7b1dfe34b88226ba61fd8bf212c7321cfe823dfbc4e5b9311

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page