Analysis updated 2026-07-03
Look up the correct Chinese title to use for a specific relative like mom's mom's brother
Build a family tree app that automatically displays the right kinship term for each relative in Chinese
Support regional dialect differences in Chinese family terms by loading a custom northern or southern mode
Reverse-lookup what family chain produces a kinship title like 表哥 to explain it to a non-native speaker
| mumuy/relationship | jin-yufeng/mp-html | auduno/headtrackr | |
|---|---|---|---|
| Stars | 3,708 | 3,708 | 3,707 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
This is a JavaScript library that calculates Chinese kinship terms. In Chinese family culture, every relative has a specific title that depends on which side of the family they are on, how many generations apart they are, and their gender. The rules are intricate enough that many adults get confused when visiting extended family. This library does the calculation for you: you describe the relationship in plain Chinese, and it returns the correct title to use. You can ask it questions in two ways. The first is a structured options object where you provide a relationship path (for example, "mom's mom's brother"), specify your own gender, and choose whether you want to know what you should call that person or what they would call you. The second is a natural-language sentence, like asking "how should my dad's mom address my wife?" and getting back the answer. The library also supports a reverse lookup: give it a title like "表哥" and it will explain the family chain that produces that relationship. Regional differences are built in. Northern and southern China use different words for many of the same relatives, and the library lets you define custom modes to match local conventions. You load a named set of overrides for the terms that differ in your dialect, and the calculator uses those instead of the defaults. The library runs in a browser (via a script tag) or in a Node.js project (via npm install as relationship.js). There is a live demo site where you can try it interactively without writing any code. The source includes a data table that maps relationship chains to titles, and the project wiki explains how the algorithm works for developers who want to understand or extend it.
A JavaScript library that calculates the correct Chinese kinship title for any family relationship, supporting natural-language queries, reverse lookup, and regional dialect variations.
Mainly JavaScript. The stack also includes JavaScript, Node.js.
Not specified in the explanation.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.