Training a Word2Vec Model with Gensim Library
Preparation
1. Install Gensim Library
Install using pip:
!pip install gensim
2. Tokenize the Raw Corpus
We use the novel "In the Name of the People" as the corpus and apply jieba for tokenization.
import jieba
import jieba.analyse
# Add terms to improve jieba segmentation accuracy
jieba.suggest_freq('Sha Ruijin', True)
jieba.suggest ...
Posted on Sun, 13 Sep 2026 16:06:46 +0000 by mybikeisace
GUI-Based Word Cloud Generator in Python
A desktop application built with Python that generates word clouds from text files using a graphical user interface. Users can select any plain text document—supporting both Chinese and English—and optionally provide a mask image to shape the resulting word cloud.
The interface also includes an image viewer for previewing background or mask ima ...
Posted on Tue, 30 Jun 2026 18:13:30 +0000 by offnordberg
Complete Configuration Guide for django-haystack Full-Text Search with Chinese Support
Dependencies Installation
Install required packages first:
pip install django-haystack whoosh jieba
Core Settings Configuration
Add haystack to the end of INSTALLED_APPS in your project's settings.py to avoid resource override conflicts:
INSTALLED_APPS = [
# Pre-existing application entries
'django.contrib.auth',
'django.contrib.co ...
Posted on Sun, 10 May 2026 07:01:03 +0000 by ou812