Skip to main content

中文「四角号码」数据与工具

四角号码,汉语词典常用检字方法之一,用最多5个阿拉伯数字来对汉字进行归类。

四角号码最重要的特点之一是字形相似的字具有相同或者相似的编码。比如 (37001)和 (37101)字形相似,编码也接近。

这种特性可以被深度学习模型用来作为字的特征之一:字形的特征。

安装

pip install four_corner_method

使用

from four_corner_method import FourCornerMethod

fcm = FourCornerMethod()
print(fcm.query('民'))  # 77747
print(fcm.query('名'))  # 27602

开发

参见 DEVELOP.md

致谢

四角号码数据来自于 wangyanhan @ 资料共享——最全的《四角号码检字表》chm

Download files

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

Source Distribution

four_corner_method-0.2.0.tar.gz (498.1 kB view details)

Uploaded Source

Built Distribution

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

four_corner_method-0.2.0-py3-none-any.whl (498.1 kB view details)

Uploaded Python 3

File details

Details for the file four_corner_method-0.2.0.tar.gz.

File metadata

  • Download URL: four_corner_method-0.2.0.tar.gz
  • Upload date:
  • Size: 498.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for four_corner_method-0.2.0.tar.gz
Algorithm Hash digest
SHA256 67fb9cf3135eae9c95e2b42e76b78b14bf188460e77df7095d9090ebfe484c9c
MD5 ff7fe7028d5f2cbb221df94fdda5acb1
BLAKE2b-256 8884b6c69890fb0f01918e827cf919889c1342dede415463d1be27f87e4dcf1d

See more details on using hashes here.

File details

Details for the file four_corner_method-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: four_corner_method-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 498.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for four_corner_method-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e4b641ab51988a72ed88b9b26068c0fa0ab43b8a1fef6ab0253114ba01b255e
MD5 7babc6069b29b9d055475af60be0a271
BLAKE2b-256 5986a114e13054d72d0a5d388133bd56efd66c0b3c21902759d819b6d9ce6a73

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1

2 files

Supported by

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