|
1 | 1 | --- |
2 | 2 | name: name-tools |
3 | | -description: Romanize Korean names, check Five Elements compatibility, lookup CJK stroke counts. |
| 3 | +description: Romanize Korean Hangul text, compute Five Elements (오행) from CJK stroke counts, check element compatibility, and generate URL slugs. Use when working with Korean names, Hanja characters, or CJK text analysis. |
| 4 | +license: MIT |
| 5 | +metadata: |
| 6 | + author: fyipedia |
| 7 | + version: "0.1.1" |
| 8 | + homepage: "https://namefyi.com/" |
4 | 9 | --- |
5 | 10 |
|
6 | | -# Name Tools |
| 11 | +# NameFYI -- Korean Name Tools for AI Agents |
7 | 12 |
|
8 | | -Korean name romanization and Five Elements analysis powered by [namefyi](https://namefyi.com/) -- a pure Python name engine with zero dependencies. |
| 13 | +Pure Python naming engine. Korean romanization using Revised Romanization, Five Elements (오행) compatibility from stroke counts, CJK stroke lookup, population formatting, and URL slug generation -- all with zero dependencies. |
9 | 14 |
|
10 | | -## Setup |
| 15 | +**Install**: `pip install namefyi` -- **Web**: [namefyi.com](https://namefyi.com/) -- **API**: [REST API](https://namefyi.com/developers/) -- **npm**: `npm install namefyi` |
11 | 16 |
|
12 | | -Install the MCP server: |
| 17 | +## When to Use |
13 | 18 |
|
14 | | -```bash |
15 | | -pip install "namefyi[mcp]" |
| 19 | +- User asks to romanize Korean text (Hangul to Latin characters) |
| 20 | +- User needs Five Elements (오행) analysis for Korean name characters |
| 21 | +- User wants to check compatibility between name elements (상생/상극) |
| 22 | +- User needs CJK character stroke counts |
| 23 | +- User asks about Korean naming traditions or Hanja meanings |
| 24 | + |
| 25 | +## Tools |
| 26 | + |
| 27 | +### `romanize_korean(hangul) -> str` |
| 28 | + |
| 29 | +Romanize Korean text using the Revised Romanization system (syllable-by-syllable decomposition). |
| 30 | + |
| 31 | +```python |
| 32 | +from namefyi import romanize_korean |
| 33 | + |
| 34 | +romanize_korean("김민준") # 'gimminjun' |
| 35 | +romanize_korean("이서연") # 'iseoyeon' |
| 36 | +romanize_korean("서울") # 'seoul' |
| 37 | +romanize_korean("부산") # 'busan' |
| 38 | +romanize_korean("한글") # 'hangeul' |
| 39 | +romanize_korean("박지성") # 'bakjiseong' |
16 | 40 | ``` |
17 | 41 |
|
18 | | -Add to your `claude_desktop_config.json`: |
| 42 | +### `five_elements_for_strokes(stroke_count) -> str` |
| 43 | + |
| 44 | +Determine the Five Elements category from a character's stroke count. Returns one of: 木 (Wood), 火 (Fire), 土 (Earth), 金 (Metal), 水 (Water). |
19 | 45 |
|
20 | | -```json |
21 | | -{ |
22 | | - "mcpServers": { |
23 | | - "namefyi": { |
24 | | - "command": "python", |
25 | | - "args": ["-m", "namefyi.mcp_server"] |
26 | | - } |
27 | | - } |
28 | | -} |
| 46 | +```python |
| 47 | +from namefyi import five_elements_for_strokes |
| 48 | + |
| 49 | +five_elements_for_strokes(1) # '木' (Wood) — 1-2 strokes |
| 50 | +five_elements_for_strokes(3) # '火' (Fire) — 3-4 strokes |
| 51 | +five_elements_for_strokes(5) # '土' (Earth) — 5-6 strokes |
| 52 | +five_elements_for_strokes(7) # '金' (Metal) — 7-8 strokes |
| 53 | +five_elements_for_strokes(9) # '水' (Water) — 9-10 strokes |
29 | 54 | ``` |
30 | 55 |
|
31 | | -## Available Tools |
| 56 | +### `check_element_compatibility(element_a, element_b) -> str` |
32 | 57 |
|
33 | | -| Tool | Description | |
34 | | -|------|-------------| |
35 | | -| `romanize_korean` | Romanize a Korean name using Revised Romanization | |
36 | | -| `five_elements` | Analyze the Five Elements (Wuxing) of a Korean name | |
37 | | -| `element_compatibility` | Check Five Elements compatibility between two names | |
38 | | -| `format_population` | Format Korean surname population statistics | |
| 58 | +Check Five Elements compatibility between two elements. Returns 'compatible' (상생), 'incompatible' (상극), or 'neutral'. |
39 | 59 |
|
40 | | -## When to Use |
| 60 | +```python |
| 61 | +from namefyi import check_element_compatibility |
| 62 | + |
| 63 | +check_element_compatibility("木", "火") # 'compatible' (Wood feeds Fire) |
| 64 | +check_element_compatibility("水", "木") # 'compatible' (Water nourishes Wood) |
| 65 | +check_element_compatibility("木", "土") # 'incompatible' (Wood parts Earth) |
| 66 | +check_element_compatibility("水", "火") # 'incompatible' (Water quenches Fire) |
| 67 | +check_element_compatibility("木", "木") # 'neutral' (same element) |
| 68 | +``` |
| 69 | + |
| 70 | +### `get_stroke_count(character) -> int` |
| 71 | + |
| 72 | +Get the stroke count for a CJK character using Unicode data. |
| 73 | + |
| 74 | +```python |
| 75 | +from namefyi import get_stroke_count |
| 76 | + |
| 77 | +get_stroke_count("金") # stroke count for the character |
| 78 | +get_stroke_count("秀") # stroke count for the character |
| 79 | +``` |
| 80 | + |
| 81 | +### `format_population(population) -> str` |
| 82 | + |
| 83 | +Format population number with appropriate suffix (M/K). |
| 84 | + |
| 85 | +```python |
| 86 | +from namefyi import format_population |
| 87 | + |
| 88 | +format_population(10_304_000) # '10.3M' |
| 89 | +format_population(850_000) # '850K' |
| 90 | +format_population(500) # '500' |
| 91 | +``` |
| 92 | + |
| 93 | +### `surname_slug(romanized, culture_slug) -> str` |
| 94 | + |
| 95 | +Generate a URL-safe slug for a surname. |
| 96 | + |
| 97 | +```python |
| 98 | +from namefyi import surname_slug |
| 99 | + |
| 100 | +surname_slug("Kim", "korean") # 'kim-korean' |
| 101 | +``` |
| 102 | + |
| 103 | +### `character_slug(romanized, meaning_keyword) -> str` |
| 104 | + |
| 105 | +Generate a URL-safe slug for a name character. |
| 106 | + |
| 107 | +```python |
| 108 | +from namefyi import character_slug |
| 109 | + |
| 110 | +character_slug("geum", "gold") # 'geum-gold' |
| 111 | +``` |
| 112 | + |
| 113 | +## REST API (No Auth Required) |
| 114 | + |
| 115 | +```bash |
| 116 | +curl https://namefyi.com/api/romanize/김민준/ |
| 117 | +curl https://namefyi.com/api/search/Kim/ |
| 118 | +curl https://namefyi.com/api/character/金/ |
| 119 | +curl https://namefyi.com/api/random/?gender=male |
| 120 | +``` |
| 121 | + |
| 122 | +Full spec: [OpenAPI 3.1.0](https://namefyi.com/api/openapi.json) |
| 123 | + |
| 124 | +## Five Elements Reference |
| 125 | + |
| 126 | +| Element | Hanja | Korean | Strokes | Generates | Overcomes | |
| 127 | +|---------|-------|--------|---------|-----------|-----------| |
| 128 | +| Wood | 木 | 목 (mok) | 1-2 | Fire | Earth | |
| 129 | +| Fire | 火 | 화 (hwa) | 3-4 | Earth | Metal | |
| 130 | +| Earth | 土 | 토 (to) | 5-6 | Metal | Water | |
| 131 | +| Metal | 金 | 금 (geum) | 7-8 | Water | Wood | |
| 132 | +| Water | 水 | 수 (su) | 9-10 | Wood | Fire | |
| 133 | + |
| 134 | +## Korean Romanization Reference |
41 | 135 |
|
42 | | -- Converting Korean names to their romanized form |
43 | | -- Analyzing the Five Elements (Wood, Fire, Earth, Metal, Water) of a name |
44 | | -- Checking name compatibility based on traditional East Asian philosophy |
45 | | -- Looking up Korean surname statistics and rankings |
| 136 | +| Hangul | Revised | McCune-Reischauer | Conventional | |
| 137 | +|--------|---------|-------------------|-------------| |
| 138 | +| 김 | gim | kim | Kim | |
| 139 | +| 이 | i | yi/i | Lee | |
| 140 | +| 박 | bak | pak | Park | |
| 141 | +| 최 | choe | ch'oe | Choi | |
| 142 | +| 정 | jeong | chong | Jung | |
46 | 143 |
|
47 | 144 | ## Demo |
48 | 145 |
|
49 | | - |
| 146 | + |
50 | 147 |
|
51 | | -## Links |
| 148 | +## Utility FYI Family |
52 | 149 |
|
53 | | -- [Name Explorer](https://namefyi.com/) -- Korean name analysis tools |
54 | | -- [API Documentation](https://namefyi.com/developers/) -- Free REST API |
55 | | -- [PyPI Package](https://pypi.org/project/namefyi/) |
| 150 | +Part of the [FYIPedia](https://fyipedia.com) ecosystem: [UnitFYI](https://unitfyi.com), [TimeFYI](https://timefyi.com), [HolidayFYI](https://holidayfyi.com), [NameFYI](https://namefyi.com), [DistanceFYI](https://distancefyi.com). |
0 commit comments