Skip to main content

qhChina

A Python toolkit for computational analysis of Chinese texts in humanities research.

Features

  • Preprocessing: Chinese text segmentation with multiple backends (spaCy, Jieba, BERT, LLM)
  • Word Embeddings: Word2Vec training and temporal semantic change analysis (TempRefWord2Vec)
  • Topic Modeling: LDA with Gibbs sampling and Cython acceleration
  • Stylometry: Authorship attribution and document clustering
  • Collocations: Statistical collocation analysis and co-occurrence matrices
  • Corpus Comparison: Identify significant vocabulary differences between corpora
  • Helpers: CJK font management, text loading, stopwords

Installation

pip install qhchina

Building from Source

git clone https://github.com/mcjkurz/qhchina.git
cd qhchina
pip install -e .

This will compile the Cython extensions and install the package in editable mode.

Documentation

Full documentation and examples: www.qhchina.org/docs/

Tests

pip install pytest
pytest tests/

License

MIT License

Release files for qhchina 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qhchina 0.2.2
File Size Uploaded
qhchina-0.2.2.tar.gz 1.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for qhchina 0.2.2
File
qhchina-0.2.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
qhchina-0.2.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
qhchina-0.2.2-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 Details
qhchina-0.2.2-cp314-cp314-macosx_10_15_universal2.whl CPython 3.14 CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) Details
qhchina-0.2.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
qhchina-0.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
qhchina-0.2.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 Details
qhchina-0.2.2-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
qhchina-0.2.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
qhchina-0.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
qhchina-0.2.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 Details
qhchina-0.2.2-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details
qhchina-0.2.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
qhchina-0.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details
qhchina-0.2.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 Details
qhchina-0.2.2-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 39.3 MB

Release files / qhchina-0.2.2.tar.gz

Download URL qhchina-0.2.2.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
2320c1cb9fc0a7726d079a0629497b8e13f35d643d685020bc22310bf20b4949
BLAKE2b-256 checksum
How to use checksums
cf7e0e068f910296bbd98da917446ad37905df1a0e2aa5b6fcba3cfae91e756b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp314-cp314-win_amd64.whl

Download URL qhchina-0.2.2-cp314-cp314-win_amd64.whl
Size 704.4 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
81dea0a7f16079285deb7b4b6123e548a11033f876cbb04deb429b2dec9e2109
BLAKE2b-256 checksum
How to use checksums
5f1c26baa78dc79eaf680d7778d4a4650303fbc4c5ecca28ac67a4cd137142e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL qhchina-0.2.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 3.7 MB
Tags CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
453fd24372780f9650482c0f99e1eaaf1659d7170ac09840709f3428d24718c6
BLAKE2b-256 checksum
How to use checksums
45cedcccf0a40694b85645ce7238fd4b0fec67c291e2d3403f8a7121de9acd74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL qhchina-0.2.2-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 3.7 MB
Tags CPython 3.14 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
02dce1eabf8bb8883d90c409cc92c57ed1e5c47368b1b96c9ca84d523b163e91
BLAKE2b-256 checksum
How to use checksums
7bb89b136d45e46524257592271436b2314402a38739fa2dd3b15207d832e5bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp314-cp314-macosx_10_15_universal2.whl

Download URL qhchina-0.2.2-cp314-cp314-macosx_10_15_universal2.whl
Size 1.3 MB
Tags CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
8f527eb29f14d856efc210484b6f0e8801fd618633780bdb3c06d1ca6e50608c
BLAKE2b-256 checksum
How to use checksums
a487714c3c537a533d2bfe61c406863b266b6192b95175588a17132d334dcf48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp313-cp313-win_amd64.whl

Download URL qhchina-0.2.2-cp313-cp313-win_amd64.whl
Size 689.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
98e69f488ed08f8375915ad94a03c253e780cf3432a1edcc065908381fab5079
BLAKE2b-256 checksum
How to use checksums
2c488519acf6dc04d9a877f27c2b2be879ecdc738527c743f975d8f777a26bf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL qhchina-0.2.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
14555135c265b67be633b1d2d164e0b183bcf3a9251322ae1e541d8be69c7ae2
BLAKE2b-256 checksum
How to use checksums
0bca9b3952f3cbfd83d500f8f0e17e53899cd7392c7024e445e0d5e27e4b761c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL qhchina-0.2.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 3.7 MB
Tags CPython 3.13 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
7a0016f31270ad129fcfa0cbb6735a55727734240b8b49b6042227ea92d26b8a
BLAKE2b-256 checksum
How to use checksums
6608ecac198be4f0e6d7ec2e445b3816a953f9634cad7c26aaa6e59969edd0b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp313-cp313-macosx_10_13_universal2.whl

Download URL qhchina-0.2.2-cp313-cp313-macosx_10_13_universal2.whl
Size 1.3 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
f4b1a9651b52767952414f9785a1680669988f4f6a6460105e2159488f321b58
BLAKE2b-256 checksum
How to use checksums
8ad86c6cbaa868804a6ffb4570eb7e2f119c3422855ac2147efcb83be757dafe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp312-cp312-win_amd64.whl

Download URL qhchina-0.2.2-cp312-cp312-win_amd64.whl
Size 689.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f832fba023434e23f019913df24496d1100716569d5638d5d5489d14e95495bd
BLAKE2b-256 checksum
How to use checksums
3392dc753cbc558abd67acd8e5c52936ddad3ba87a985378991ae9531f0323dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL qhchina-0.2.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6ca2d27f783099d06f4662de5bd0e2ed368ed053cd51f9e868923e0b65eb2b56
BLAKE2b-256 checksum
How to use checksums
e9aa67441d78fc62845fbce89ce826a145baa33d8604bc36354019104bd4ad30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL qhchina-0.2.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 3.7 MB
Tags CPython 3.12 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
be49d14bce90792110071bf4708b457fed05bf484cef0c127b02efc14dc31f8e
BLAKE2b-256 checksum
How to use checksums
322c301940bd8a154081fee94af178346b186d13a97bf79b3107448ca2c4e9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp312-cp312-macosx_10_13_universal2.whl

Download URL qhchina-0.2.2-cp312-cp312-macosx_10_13_universal2.whl
Size 1.3 MB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
c57adb517d3d47e41da902de8ee80fed1c1dd8a55ef1c54de2282a1ada0586c3
BLAKE2b-256 checksum
How to use checksums
7fdc03bb61036792364ffef73a4acb15a597d5db0886cd01d722eb115badeddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp311-cp311-win_amd64.whl

Download URL qhchina-0.2.2-cp311-cp311-win_amd64.whl
Size 691.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e72983ba0f32323c26a857a64018657632906621017f717902da4b8dd74c64e9
BLAKE2b-256 checksum
How to use checksums
dd286b81ac4a8ef2862751127dcc99cde50b37794cb10a78b045c4642a69f0db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL qhchina-0.2.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7d8da883ad0d15cbef8d69e58a6c5469ab09020184127e37b354eae30320357c
BLAKE2b-256 checksum
How to use checksums
abef59452d5b6b047b349a55dc5e1d4a4aa76b4ad9fc95dff62bdba9d0b3663c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL qhchina-0.2.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 3.8 MB
Tags CPython 3.11 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
f0ca79a13f607ff0db0bb0be0bac72a457d10c1831ce92cb6497e7918372f82a
BLAKE2b-256 checksum
How to use checksums
0961f562e0c4295cf848b38fbf9015cc72a380c7c948a68970503c247c2566c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / qhchina-0.2.2-cp311-cp311-macosx_10_9_universal2.whl

Download URL qhchina-0.2.2-cp311-cp311-macosx_10_9_universal2.whl
Size 1.3 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
1a7f0d2964d03cadc9df676717876f567eaeb32b9f4248a0df6aa7646611ae3e
BLAKE2b-256 checksum
How to use checksums
17c8f2e5913b341f320d1d65689ee41663ddb45204dcc7cf76c8815e72add378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.5

17 release files

0.2.4

17 release files

0.2.3

17 release files

This release

0.2.2 This release

17 release files

0.2.1

17 release files

0.1.6

17 release files

0.1.5

25 release files

0.0.43

5 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.33

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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