qhChina is an educational Python toolkit designed for computational analysis of Chinese texts, with a particular focus on applications in humanities research. The toolkit addresses a range of natural language processing (NLP) tasks relevant to Chinese language data, providing modules for preprocessing, analytics, and interactive learning. It is under active development and can be installed via pip.
The toolkit offers multiple segmentation backends for Chinese text, including spaCy, Jieba, BERT, and LLM-based segmenters. Users can create segmenters with configurable strategies and filters, such as stopwords and minimum word length. The analytics module features tools for word embedding training using Word2Vec, including functions for building vocabularies, training models, exporting vectors, and analyzing temporal semantic change. DynamicWord2Vec and TempRefWord2Vec allow for exploration of semantic drift and changes in word meaning over time. Topic modeling is supported through an LDA Gibbs sampler, which includes methods for topic discovery, coherence evaluation, document similarity, and visualization of topic distributions.
For authorship attribution and document clustering, the stylometry module provides tools for feature comparison, hierarchical clustering, author profile generation, and various distance and similarity metrics. Collocation analysis is facilitated through statistical tools for co-occurrence matrices, collocate discovery, and keyword-in-context (KWIC) analysis. The toolkit also includes helpers for font management, loading stopwords, text preprocessing, and utility functions such as encoding detection and batch processing.
qhChina is intended for researchers, students, and educators working with Chinese textual data in computational humanities and related fields. Its educational modules offer interactive learning tools and visualizations for fundamental NLP concepts. The package supports centralized configuration for logging and random number generation, enabling reproducible research workflows. All functionality is accessed via Python modules, and the documentation provides detailed guidance for each component.
In the Frameworks & SDKs space, qhChina takes a focused approach. It facilitates Chinese text segmentation and word embedding for natural language processing tasks. It is built for NLP researchers and developers. It runs on the web and the command line.
qhChina first shipped in 2025. The project is developed in the open on GitHub with 2 commits in the last 90 days. Among its 5 catalogued features are text segmentation, word embeddings, and preprocessing.
Latest indexed changes and source events
Other apps tracked under the same category.