Generate 13-Domain Astrological Interpretations from Birth Data
Enter a birth date, time, and gender to automatically generate interpretation sentences across 13 aspects, ranging from personality to health and wealth. This repository provides the algorithm for constructing Zi Wei Dou Shu charts, a traditional Chinese astrology system, along with a large dataset of interpretations based on those charts.
October 2026: Significant Expansion in Data Scale and Accuracy
The most significant change in the recent update is the release of the v4.0 13-dimensional interpretation dataset. The total size reaches 56.6GB after extraction, but files are divided by year, allowing you to selectively download only the required periods. Additionally, the source of interpretation sentences has been strictly verified; unsupported citations were removed, and conditions are explicitly stated for conditional interpretations, thereby enhancing data reliability.
Precise Time Correction and Classical-Based Algorithm
The core of this engine lies in calculating actual solar time rather than simply accepting time input. It corrects for time differences based on the longitude of the birthplace and the season, reducing time zone errors according to east-west direction. It also automatically accounts for the Chinese daylight saving time period implemented from 1986 to 1991. The method for handling leap months and the date change rules for the Zi hour are also configurable. Star brightness is divided into 7 levels, and criteria from various schools can be switched, faithfully following the detailed regulations of traditional astrology.
Dataset Usage Scope and License
The provided dataset follows the CC BY 4.0 license and allows commercial use, provided that the source is cited. This data is suitable as training material for fine-tuning AI models and can also be used as a knowledge base for RAG (Retrieval-Augmented Generation) systems. In contrast, the original lecture texts by Mr. Ni Hai Sha are under the CC BY-NC-SA 4.0 license and may only be used for non-commercial learning and research purposes. The code itself is under the MIT license and can be freely modified and redistributed.
Feasibility from a Developer's Perspective
Written in TypeScript and Next.js 16, it can be easily integrated into web environments. After running npm install and the npm run dev command to start a local server, you can test chart generation and visualization directly in the browser. However, the AI-based real-time interpretation feature is excluded from the open-source version, so if you want this feature, you must implement the API yourself. Instead, static interpretation data for the 13 domains is already provided, so it can be immediately applied to static content services or data analysis projects based on this data. A test suite is included, making it easy to verify the consistency of the algorithm.
Items to Check Before Use
This repository provides the 'chart construction' and 'interpretation data' for astrology but does not fix all detailed regulations of astrology into a single standard. Since leap month handling and star brightness criteria may vary by school, you must select settings that suit your purpose. Additionally, since the dataset was generated with a specific version of the algorithm at a certain point in time, you need to check consistency with existing data if you update the engine code. In particular, keep in mind that interpretations related to the 6th Palace (parents, siblings, children) have traditional limitations, and it is best to use them only as reference material.