Start with specific phonetics (ha,he , hu )
Should be derived from tamil gods name.
The numerology matrix should come down to any of below 19,29,39,44,54,66,47,36
Sound very much a Tamil name.
OK with few spelling creativities to match numerology
Iterating with all these conditions is pretty hard since you have to do the math and checklist manually everytime for every single possible name and there are only so many names you know. The preist or others simply dont have that much time.
Solution - ai baby name generator with numerology
Wrote a small script that can come with up recommendations based on Tamil history and religious artifacts along with other conditions.
Input:
Demo video
Code walkthrough
reference table for calculating the final number
Usage
jayin
β’6mo ago
link to gist would have been better.
1 NUMBER_MAP = {
2 'A': 1, 'Q': 1, 'I': 1, 'J': 1, 'Y': 1,
3 'B': 2, 'K': 2, 'R': 2,
4 'C': 3, 'G': 3, 'L': 3, 'S': 3,
5 'D': 4, 'M': 4, 'T': 4,
6 'E': 5, 'H': 5, 'N': 5, 'X': 5,
7 'U': 6, 'V': 6, 'W': 6,
8 'O': 7, 'Z': 7,
9 'F': 8, 'P': 8
10 }
11
1 # get names from anthropic
2 def get_names_from_llm(inputs: Dict, api_key: str) -> List[Tuple[str, str]]:
3 url = "https://api.anthropic.com/v1/messages"
4 headers = {
5 "Content-Type": "application/json",
6 "x-api-key": api_key,
7 "anthropic-version": "2023-06-01"
8 }
9
10 prompt = f"""As a learned Hindu astrologer and numerologist with deep knowledge of Tamil culture and spirituality, Generate 20 Tamil {inputs['gender'].lower()} names that:
11 1. Must start with or contain initials: {inputs['initials']}
12 2. {"Start with prefix " + inputs['prefix'] if inputs['prefix'] else ""}
13 3. {"Are related to deities: " + ", ".join(inputs['deities']) if inputs['deities'] else ""}
14 4. When calculated using numerology (including initials in calculation), sum should be one of: {', '.join(map(str, inputs['numerology']))}
15
16 Format: Names only, one per line. Do not include initials in the names.
17 """
18
19 data = {
20 "messages": [{"role": "user", "content": prompt}],
21 "model": "claude-3-opus-20240229",
22 "max_tokens": 500,
23 "temperature": 0.9
24 }
25
26 try:
27 <PARSE RESPONSES TO GET NAMES>
28
29 return filtered_names[:10]
30
31 except Exception as e:
32 print(f"{Fore.RED}Error generating names: {str(e)}{Style.RESET_ALL}")
33 return []
34
35
1 # always print reference table
2 def print_reference_table():
3 print(f"\n{Fore.CYAN}Numerology Reference Table:{Style.RESET_ALL}")
4 print(f"{Fore.YELLOW}" + "-" * 40 + f"{Style.RESET_ALL}")
5 number_groups = {}
6 for letter, number in NUMBER_MAP.items():
7 if number not in number_groups:
8 number_groups[number] = []
9 number_groups[number].append(letter)
10
11 for number in sorted(number_groups.keys()):
12 letters = ' '.join(sorted(number_groups[number]))
13 print(f"{Fore.GREEN}Number {number}: {Fore.WHITE}{letters}{Style.RESET_ALL}")
14 print(f"{Fore.YELLOW}" + "-" * 40 + f"{Style.RESET_ALL}")
15
16 # for each name in result calculate final number
17 def get_number(letter: str) -> int:
18 return NUMBER_MAP.get(letter.upper(), 0)
19
20 def calculate_numerology(name: str) -> int:
21 return sum(get_number(char) for char in name if char.isalpha())
22
23
1 # additionaly get name insights frmo anthropic
2 def get_name_insights(name: str, gender: str) -> str:
3 url = "https://api.anthropic.com/v1/messages"
4 headers = {
5 "Content-Type": "application/json",
6 "x-api-key": os.getenv('ANTHROPIC_API_KEY'),
7 "anthropic-version": "2023-06-01"
8 }
9
10 prompt = f"""As a learned Hindu astrologer and numerologist with deep knowledge of Tamil culture and spirituality, provide insights about the name '{name}'. Include:
11 1. Etymology and meaning of each word/component
12 2. Connection to deities or spiritual concepts
13 3. Cultural significance in Tamil tradition
14 4. Any special numerological significance of the letters/sounds
15 5. Positive attributes and energies associated with the name
16 6. If used, which famous Tamil figures or saints had this name
17 7. Regional variations or similar names
18
19 Format your response in a spiritual and insightful way, as a Tamil elder would explain."""
20
21 data = {
22 "messages": [{"role": "user", "content": prompt}],
23 "model": "claude-3-opus-20240229",
24 "max_tokens": 1000,
25 "temperature": 0.7
26 }
27
28 try:
29 response = requests.post(url, headers=headers, json=data)
30 response.raise_for_status()
31 response_json = response.json()
32 content = response_json.get('content', [])
33 if isinstance(content, list) and len(content) > 0:
34 return content[0].get('text', '')
35 return "Could not generate insights for this name."
36 except Exception as e:
37 return f"Error generating insights: {str(e)}"
38
39
40 def display_results(name_pairs: List[Tuple[str, str]], target_nums: List[int], gender: str) -> None:
41 while True:
42 print(f"\n{Fore.CYAN}Name Analysis{Style.RESET_ALL}")
43 print(f"{Fore.YELLOW}" + "-" * 70 + f"{Style.RESET_ALL}")
44 print(f"{Fore.GREEN}{'#':<3} {'Base Name':<20} {'Full Name':<25} {'Numerology':<8} {'Target'}{Style.RESET_ALL}")
45 print(f"{Fore.YELLOW}" + "-" * 70 + f"{Style.RESET_ALL}")
46
47 for idx, (base_name, full_name) in enumerate(name_pairs, 1):
48 num = calculate_numerology(full_name)
49 matches = f"{Fore.GREEN}β{Style.RESET_ALL}" if num in target_nums else f"{Fore.RED}β{Style.RESET_ALL}"
50 print(f"{Fore.CYAN}{idx:<3} {Fore.WHITE}{base_name:<20} {full_name:<25} {num:<8} {matches}")
51
52 print(f"\n{Fore.CYAN}Options:{Style.RESET_ALL}")
53 print(f"{Fore.GREEN}1-N: {Fore.WHITE}Select name for detailed analysis{Style.RESET_ALL}")
54 print(f"{Fore.GREEN}E: {Fore.WHITE}Explain name meaning and significance{Style.RESET_ALL}")
55 print(f"{Fore.GREEN}R: {Fore.WHITE}Show reference table{Style.RESET_ALL}")
56 print(f"{Fore.GREEN}Q: {Fore.WHITE}Quit{Style.RESET_ALL}")
57
58 choice = input(f"\n{Fore.YELLOW}Enter choice: {Style.RESET_ALL}").upper()
59
60 if choice == 'Q':
61 break
62 elif choice == 'R':
63 print_reference_table()
64 elif choice.isdigit() and 1 <= int(choice) <= len(name_pairs):
65 show_detailed_analysis(name_pairs[int(choice)-1][1])
66 elif choice == 'E':
67 idx = int(input(f"{Fore.YELLOW}Enter name number to explain: {Style.RESET_ALL}"))
68 if 1 <= idx <= len(name_pairs):
69 print(f"\n{Fore.CYAN}Analyzing name significance...{Style.RESET_ALL}")
70 insights = get_name_insights(name_pairs[idx-1][1], gender)
71 print(f"\n{Fore.GREEN}Divine Insights:{Style.RESET_ALL}")
72 print(f"{Fore.WHITE}{insights}{Style.RESET_ALL}")
73 input(f"\n{Fore.YELLOW}Press Enter to continue...{Style.RESET_ALL}")
74 else:
75 print(f"{Fore.RED}Invalid choice!{Style.RESET_ALL}")
76
77
1 ./generate.py
2
1,180 views