--- license: mit language: - zh size_categories: - n<1K task_categories: - text-generation - question-answering - text-retrieval - text-classification tags: - chinese-muslim - islamic-culture - chinese - rag - knowledge-base - halal-food - hui-people - mosque - islamic-studies - quran - muslim-travel - text-corpus - nlp - retrieval-augmented-generation pretty_name: "Chinese Muslim Knowledge Base & RAG Corpus" dataset_info: features: - name: id dtype: string - name: title dtype: string - name: text dtype: string - name: text_preview dtype: string - name: source_url dtype: string - name: content_hash dtype: string - name: author dtype: string - name: language dtype: string - name: topic_category dtype: string - name: char_count dtype: int32 - name: word_count dtype: int32 - name: image_count dtype: int32 - name: has_images dtype: bool - name: source_platform dtype: string splits: - name: train num_examples: 223 - name: validation num_examples: 27 - name: test num_examples: 29 config_name: default configs: - config_name: default data_files: - split: train path: data/train-*.parquet - split: validation path: data/validation-*.parquet - split: test path: data/test-*.parquet --- # ☪ Chinese-Muslim: Comprehensive Chinese Muslim Knowledge Base & RAG Corpus [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![GitHub](https://img.shields.io/badge/GitHub-Repository-black)](https://github.com/salaamalykum/Chinese-Muslim) ## Dataset Description **Chinese-Muslim** is the **flagship dataset** of the Salaamalykum project — a comprehensive knowledge base containing **279 articles** covering the full spectrum of Chinese Muslim life: culture, travel, mosques, halal food, religious practice, history, and community documentation across **20+ countries**. Every article preserves **complete full-text content** with all **16,560 embedded image references**. ### Key Properties | Property | Value | |---|---| | **Total Records** | 279 | | **Language** | Chinese (Simplified, zh-CN) | | **Format** | Parquet (auto Dataset Viewer enabled) | | **Splits** | train (223), validation (27), test (29) | | **Avg. Article Length** | 14,599 characters | | **Total Characters** | 4,073,145 | | **Total Image References** | 16,560 | | **Articles with Images** | 275 / 279 | | **License** | MIT | | **Version** | v2.0.0 | | **Release Date** | 2026-06-13 | --- ## Embeddable Dataset Viewer Embed in any webpage: ```html ``` **Direct viewer links:** - [🔍 Browse All (train)](https://huggingface.co/datasets/qurancn/Chinese-Muslim/viewer/default/train) - [🕌 Mosques](https://huggingface.co/datasets/qurancn/Chinese-Muslim/viewer/default/train?q=Mosque) - [🍖 Halal Food](https://huggingface.co/datasets/qurancn/Chinese-Muslim/viewer/default/train?q=Halal+Food) - [✈️ Travel](https://huggingface.co/datasets/qurancn/Chinese-Muslim/viewer/default/train?q=Travel) - [📖 Ramadan](https://huggingface.co/datasets/qurancn/Chinese-Muslim/viewer/default/train?q=Ramadan) --- ## Topic Distribution | Category | Count | |---|---| | Mosques & Architecture | 139 | | Halal Food & Cuisine | 80 | | Religious Life & Practice | 29 | | Culture & Knowledge | 11 | | History & Heritage | 11 | | Travel & Exploration | 7 | | Muslim Communities | 2 | --- ## Data Schema | Column | Type | Description | Queryable | |---|---|---|---| | `id` | string | Article ID from source platform | ✅ | | `title` | string | Full article title | ✅ Full-text | | `text` | string | **Complete article body** with all Markdown images | ✅ Full-text | | `text_preview` | string | First 300 chars (Viewer-friendly preview) | ✅ | | `source_url` | string | Canonical URL on salaamalykum.com | ✅ | | `content_hash` | string | SHA-256 integrity hash | ✅ | | `author` | string | Original article author | ✅ Filter | | `language` | string | BCP-47 language tag (`zh-CN`) | ✅ Filter | | `topic_category` | string | One of 7 categories | ✅ Filter | | `char_count` | int32 | Character count of full article | ✅ Sort | | `word_count` | int32 | Word/token count | ✅ Sort | | `image_count` | int32 | Number of embedded image references | ✅ Sort | | `has_images` | bool | Whether article contains images | ✅ Filter | | `source_platform` | string | Source website identifier | ✅ Filter | > **Note on images**: All image URLs are preserved inline as Markdown `![image](url)` within the `text` field. Images are hosted externally and render when viewing raw Markdown. ### SQL Console Queries Run directly in [Data Studio](https://huggingface.co/datasets/qurancn/Chinese-Muslim): ```sql -- Topic breakdown SELECT topic_category, COUNT(*) as count, AVG(char_count) as avg_len FROM train GROUP BY topic_category ORDER BY count DESC; -- Longest articles SELECT title, char_count, image_count, source_url FROM train ORDER BY char_count DESC LIMIT 10; -- Most image-rich articles SELECT title, image_count, char_count FROM train WHERE has_images = true ORDER BY image_count DESC LIMIT 10; -- Search by keyword SELECT title, text_preview, source_url FROM train WHERE title LIKE '%Ramadan%'; ``` --- ## Data Samples #### Example: Authentic Halal Chinese Food Beijing: Xinjiang Restaurant, Y | Field | Value | |---|---| | `id` | `salaamalykum.com` | | `title` | Authentic Halal Chinese Food Beijing: Xinjiang Restaurant, Yunnan Dish... | | `text_preview` | # Authentic Halal Chinese Food Beijing: Xinjiang Restaurant, Yunnan Dishes & Niujie Snacks Reposted from the web Summa... | | `source_url` | `https://salaamalykum.com` | | `topic_category` | Halal Food & Cuisine | | `char_count` | 10332 | | `image_count` | 43 | #### Example: Authentic Hui Muslim Food in Beijing: Speed Pizza, Fujian Be | Field | Value | |---|---| | `id` | `salaamalykum.com` | | `title` | Authentic Hui Muslim Food in Beijing: Speed Pizza, Fujian Beef and Tur... | | `text_preview` | # Authentic Hui Muslim Food in Beijing: Speed Pizza, Fujian Beef and Turkish Qubbe Reposted from the web Summary: This... | | `source_url` | `https://salaamalykum.com` | | `topic_category` | Halal Food & Cuisine | | `char_count` | 15088 | | `image_count` | 60 | #### Example: Authentic Muslim Life Guide in the Muslim World: Shaban Virt | Field | Value | |---|---| | `id` | `salaamalykum.com` | | `title` | Authentic Muslim Life Guide in the Muslim World: Shaban Virtues, Dua a... | | `text_preview` | # Authentic Muslim Life Guide in the Muslim World: Shaban Virtues, Dua and Ramadan Preparation Reposted from the web S... | | `source_url` | `https://salaamalykum.com` | | `topic_category` | Religious Life & Practice | | `char_count` | 8891 | | `image_count` | 1 | --- ## Data Collection & Processing Pipeline ### Source All articles originate from [salaamalykum.com](https://salaamalykum.com), a community-driven platform documenting Chinese Muslim life, culture, and global Islamic heritage. ### Extraction Method Articles were extracted from the platform's content management system and converted to structured Markdown with YAML frontmatter. Each article preserves its original source URL, author attribution, and content integrity hash. ### Processing Steps 1. **Content Extraction**: Articles extracted from WeCenter 3.1.9 CMS (OpenResty + PHP 7.0 + MySQL) 2. **Format Standardization**: Normalized to Markdown with YAML frontmatter (title, URL, author, timestamps, hash) 3. **BBCode → Markdown**: `[img]url[/img]` → `![image](url)`, `[b]text[/b]` → `**text**` 4. **HTML Cleanup**: Entity unescaping + whitespace normalization 5. **SHA-256 Hashing**: Content integrity verification per article 6. **Topic Classification**: Rule-based keyword classifier into 7 categories 7. **Parquet Serialization**: `pyarrow` with `row_group_size=50`, `write_page_index=True` 8. **Split Generation**: Deterministic shuffle (seed=42), 80/10/10 train/validation/test ### Known Limitations - Image hosting: 16,560 image URLs reference external hosts; not embedded as binary - Some articles may contain residual formatting artifacts from CMS migration - Temporal coverage: approximately 2020–2026 --- ## Related Datasets | Dataset | Articles | Focus | |---|---|---| | **[Chinese-Muslim](https://huggingface.co/datasets/qurancn/Chinese-Muslim)** (this) | 279 | Full-spectrum Chinese Muslim knowledge | | [Chinese-Muslim-Travel](https://huggingface.co/datasets/qurancn/Chinese-Muslim-Travel) | 347 | Muslim travel & halal tourism | | [Islamic-Culture](https://huggingface.co/datasets/qurancn/Islamic-Culture) | 260 | Islamic culture & heritage | --- ## Usage ### Python (Hugging Face Datasets) ```python from datasets import load_dataset ds = load_dataset("qurancn/Chinese-Muslim") print(ds) # Access full article with all images article = ds["train"][0] print(article["title"]) print(article["text"]) # Complete body with ![image](...) references print(article["image_count"]) ``` ### LangChain RAG ```python from langchain.vectorstores import FAISS from langchain.embeddings import HuggingFaceEmbeddings from datasets import load_dataset ds = load_dataset("qurancn/Chinese-Muslim", split="train") texts = [f"{row['title']}\n{row['text']}" for row in ds] embeddings = HuggingFaceEmbeddings(model_name="shibing624/text2vec-base-chinese") vectorstore = FAISS.from_texts(texts, embeddings) ``` --- ## Version History | Version | Date | Changes | |---|---|---| | `v2.0.0` | 2026-06-13 | Full production rebuild: 279 articles, Parquet, 3 splits, 14-column schema, complete text + 16,560 images | | `v1.0.0` | 2026-06-13 | Initial legacy upload | --- ## Citation ```bibtex @dataset{chinese_muslim_2026, title={Chinese-Muslim: A Comprehensive Chinese Muslim Knowledge Base and RAG Corpus}, author={Salaamalykum Project}, year={2026}, publisher={Hugging Face}, url={https://huggingface.co/datasets/qurancn/Chinese-Muslim} } ``` --- ## License [MIT License](https://opensource.org/licenses/MIT) ## Contact - Email: [bropeace@protonmail.com](mailto:bropeace@protonmail.com) - GitHub: [https://github.com/salaamalykum](https://github.com/salaamalykum) - Website: [https://salaamalykum.com](https://salaamalykum.com)