qhChina
A Python toolkit for computational analysis of Chinese texts in humanities research.
Modules
- Preprocessing: Chinese text segmentation with multiple backends (spaCy, Jieba, BERT, LLM), plus normalization helpers.
- Analytics: Core analysis tools including:
- Word Embeddings:
Word2Vec,TempRefWord2Vec,DynamicWord2Vec, andGloVe. - Topic Modeling:
LDAGibbsSamplerwith Gibbs sampling and Cython acceleration. - Stylometry: Authorship attribution, similarity analysis, and document clustering.
- Collocations: Statistical collocation analysis, co-occurrence matrices, and collocate comparison across corpora.
- Text Reuse: Shared sequence detection across documents/corpora.
- Vector Utilities: Similarity, distance, alignment, and visualization helpers.
- Word Embeddings:
- Educational: Interactive learning tools and visualizations for basic NLP concepts.
- Helpers: Font management, text loading, stopword utilities, and corpus download helpers.
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/
Issues can be posted here: qhchina issues.
Tests
pip install pytest
pytest tests/
License
MIT License
Metadata
Release files for qhchina 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qhchina-0.2.7.tar.gz | 1.4 MB | With provenance | Details for qhchina-0.2.7.tar.gz |
Built distributions (wheels)
Total release size: 41.3 MB
Release files / qhchina-0.2.7.tar.gz
| Download URL | qhchina-0.2.7.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93913a6c7708ae546d9880d13eadd819a88ff663973bbd05e8e3c17a849cf634
|
|
BLAKE2b-256 checksum How to use checksums |
6886bb12ca3419d897f9d1dd9975a7847b9390ab1c3f9e0afcb35496a6685a35
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp314-cp314-win_amd64.whl
| Download URL | qhchina-0.2.7-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 729.4 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
01835adab4a184e94ce831f116fcea28cf0ff94c398b77214feb97427ed81c80
|
|
BLAKE2b-256 checksum How to use checksums |
f9008e431e8181e1168d1c55bcb4ab4632f772ebac132259c433819d94948d51
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | qhchina-0.2.7-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ed7e9539e1a9290f3ddaef76a12e910a99f49c7b7fa2fe9fb9bc526d5251cea3
|
|
BLAKE2b-256 checksum How to use checksums |
2764c19e03595883c5d83c13d355805b4b2a26217c6452028825e720e5742960
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | qhchina-0.2.7-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.14 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
90879ef41530e03e24801ecad0a4e9e69c7b829b22d4d2e09e0cd6a5955ba6da
|
|
BLAKE2b-256 checksum How to use checksums |
9ea6f957b671a1043413a2244c1dfc8de0beb1f45e9ce2e7050e3a355b86d21e
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp314-cp314-macosx_10_15_universal2.whl
| Download URL | qhchina-0.2.7-cp314-cp314-macosx_10_15_universal2.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
c7e1f62340b2a5da629237e5a714877a7af79aaefe97b9a4c8a27332ffef35ab
|
|
BLAKE2b-256 checksum How to use checksums |
62022c318c2d2baa9a27036564e5f582b2a7968dc5754efaac64278626ec878a
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp313-cp313-win_amd64.whl
| Download URL | qhchina-0.2.7-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 715.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3f788ba467b7b11e5bee1666d47d7a77e2cc97273e0a81e6e20cfb790a676a79
|
|
BLAKE2b-256 checksum How to use checksums |
3bc68405de561917cf004a572c70f8563e3575b8c004fa35c783efffadaaf5b0
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | qhchina-0.2.7-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
bad116575893b7fe93f8fcb049428e25325a3e943eebf13d8781584eac2d09c1
|
|
BLAKE2b-256 checksum How to use checksums |
64c6dc155d20e3fa920bdf1e26244412d5eba381c090f0487b3fa61ea853ebbd
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | qhchina-0.2.7-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.13 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
ba8f2c160c122daf4ff66298c42493320c23a386531a493b58301bcd6db49ff8
|
|
BLAKE2b-256 checksum How to use checksums |
96ff1082db02d98c9499ae6609a4124b3c83baaaec7c525644c1d167349f8b27
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp313-cp313-macosx_10_13_universal2.whl
| Download URL | qhchina-0.2.7-cp313-cp313-macosx_10_13_universal2.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
a811d96b7e7cb579c3394f93bdec63cd1285dd82bd6c028021f7dcafc9aecb08
|
|
BLAKE2b-256 checksum How to use checksums |
5b59411dbc189db0222e33c0ca25ac93559e3da67e23ecd3ce164e450516cc63
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp312-cp312-win_amd64.whl
| Download URL | qhchina-0.2.7-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 716.9 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
15673db87bd84d9d4bb4acca859f4549c8fac0ddbc2d3b61f4de36b9b4a6172c
|
|
BLAKE2b-256 checksum How to use checksums |
20dfbb31c2f135909d186237c9621e9814f9195b37d76c7672f1749ab54121ca
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | qhchina-0.2.7-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
288242f3f9b55e758ec8b03494d3570472616945b014b3b23f0711185163b74d
|
|
BLAKE2b-256 checksum How to use checksums |
9e8110fa238258e0f14a6b59eeac5d02d8d28cbf5884389d311fd3f16545c6af
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | qhchina-0.2.7-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.12 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
fc5ce4da1bab5a7b964c48ad4a448a7c60e4c94be9ba4f0494fe6a8d1d499241
|
|
BLAKE2b-256 checksum How to use checksums |
4752b21a68591ac05f5b09b995332c6c4d03177a2a542387d5f7e1527399ab37
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp312-cp312-macosx_10_13_universal2.whl
| Download URL | qhchina-0.2.7-cp312-cp312-macosx_10_13_universal2.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
219c3660cd6cc2320cd166ff495f95f14f7a393251d1c3fa8c48a57daa5a1782
|
|
BLAKE2b-256 checksum How to use checksums |
aaa61e838826b701673dfa8a314038ba9ad3ed001c01204964740516e55fb3e5
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp311-cp311-win_amd64.whl
| Download URL | qhchina-0.2.7-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 717.7 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
852c3d68467541dcbc3d6d79a0eb965378c9fcbad33c0c9e9847eb741d1fc7fc
|
|
BLAKE2b-256 checksum How to use checksums |
98d554e3bc9cba1a2e9da5b7225e8ffc0244a8fe711053ef729dd92a58e43045
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | qhchina-0.2.7-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
03f3abc3ee3deccc6c2f63c67f73d4650df64ee2d03f164bcd7dc5eb36dbd6c3
|
|
BLAKE2b-256 checksum How to use checksums |
f33673497c0d582a3403373a8cf11ec534ec0cdc9f43b9f03866da93b9b4cbc0
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | qhchina-0.2.7-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
bd431968a717120633dee97c7883b62e15ee4f3e13e54c6771e34a923b86e5c6
|
|
BLAKE2b-256 checksum How to use checksums |
9c1f73f9d7301beb54e59c231895506f59199807700e7c0195321696cf9021ac
|
| 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 Sep 28, 2026.
Transparency logRelease files / qhchina-0.2.7-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | qhchina-0.2.7-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
6e763cf61a69ef23b68a82448a3425349416232067e933c27541c4453c8c6c54
|
|
BLAKE2b-256 checksum How to use checksums |
eee6086c957cca661a25e5c3fc4926ce1f7de027bb575131b67c38c858b0a84a
|
| 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 Sep 28, 2026.
Transparency logSecurity for qhchina 0.2.7
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.
Full provenance
All 17 files in this release have been uploaded with provenance metadata.
Attestation for qhchina-0.2.7.tar.gz
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 Sep 28, 2026.
Transparency logA 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.