git404hub

what is relationship fr?

mumuy/relationship — explained in plain English

Analysis updated 2026-07-03

3,708JavaScriptAudience · developerComplexity · 2/5Setup · easy

tl;dr

A JavaScript library that calculates the correct Chinese kinship title for any family relationship, supporting natural-language queries, reverse lookup, and regional dialect variations.

vibe map

mindmap
  root((relationship))
    What it does
      Chinese kinship calculator
      Title lookup
      Reverse lookup
    Query modes
      Structured options object
      Natural language sentence
    Features
      Regional dialects
      Custom term overrides
      Reverse lookup
    How to use
      Browser script tag
      npm install
      Live demo site

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Look up the correct Chinese title to use for a specific relative like mom's mom's brother

VIBE 2

Build a family tree app that automatically displays the right kinship term for each relative in Chinese

VIBE 3

Support regional dialect differences in Chinese family terms by loading a custom northern or southern mode

VIBE 4

Reverse-lookup what family chain produces a kinship title like 表哥 to explain it to a non-native speaker

what's the stack?

JavaScriptNode.js

how it stacks up fr

mumuy/relationshipjin-yufeng/mp-htmlauduno/headtrackr
Stars3,7083,7083,707
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min
Not specified in the explanation.

in plain english

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.

prompts (copy fr)

prompt 1
I'm building a Chinese family tree app in JavaScript and need to display the correct kinship title for each relative. Show me how to install relationship.js and call it with a relationship path like mom's brother.
prompt 2
Show me how to use relationship.js to answer the natural-language question: how should my dad's mom address my wife?
prompt 3
I want to support southern Chinese kinship terms in my app using relationship.js. How do I load a regional dialect mode?
prompt 4
How do I use the reverse lookup feature in relationship.js to take a title like 表哥 and get back the family chain that produces it?
prompt 5
Walk me through adding relationship.js to a browser project via a script tag and showing the kinship term for a relationship on the page.

Frequently asked questions

what is relationship fr?

A JavaScript library that calculates the correct Chinese kinship title for any family relationship, supporting natural-language queries, reverse lookup, and regional dialect variations.

What language is relationship written in?

Mainly JavaScript. The stack also includes JavaScript, Node.js.

What license does relationship use?

Not specified in the explanation.

How hard is relationship to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is relationship for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.