Skip to content

Commit 05b3ffe

Browse files
committed
adding more ehanced nodes via AI tools
1 parent e400567 commit 05b3ffe

24 files changed

Lines changed: 14806 additions & 2000 deletions

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,49 @@ All files are output to the `dist` directory.
3939

4040
## Submitting updates
4141

42-
You are welcome to submit your own changes to this! The easiest method is to use the page either on github pages or built locally switch to the JSON editor and then make a change to the entry or child node you want to change. If you switch back, you will see the update reflected.
42+
You are welcome to submit your own changes to this! There are several ways to contribute:
43+
44+
### Manual Editing
45+
The easiest method is to use the page either on github pages or built locally switch to the JSON editor and then make a change to the entry or child node you want to change. If you switch back, you will see the update reflected.
4346

4447
You can then press the "Download JSON" button on the Interaction panel. You can then clone or fork the repo, replace the existing `Creative_Tech_Taxonomy_data.json` file and submit it as a pull request to have it reflected in the main page.
4548

49+
### AI-Assisted Content Enhancement
50+
For bulk content improvements, we have an AI-powered enhancement system that can efficiently add descriptions and links to nodes that need them:
51+
52+
#### Prerequisites
53+
1. Install Python dependencies: `pip install anthropic`
54+
2. Set your Claude API key: `export ANTHROPIC_API_KEY="your-api-key"`
55+
56+
#### Enhancement Workflow
57+
```bash
58+
# 1. Analyze current state and identify nodes needing improvement
59+
python enhance.py analyze
60+
61+
# 2. Generate an efficient processing plan
62+
python enhance.py plan
63+
64+
# 3. Process multiple batches automatically (recommended)
65+
python enhance.py batch 5
66+
67+
# OR process individual batches manually
68+
python enhance.py single sample_batch_for_api.json
69+
70+
# Clean up backup files if needed
71+
python enhance.py cleanup
72+
```
73+
74+
#### Key Features
75+
- **10x efficiency**: Processes batches of related nodes instead of individual API calls
76+
- **Source file updates**: Modifies the individual taxonomy files (not just the compiled version)
77+
- **Smart backup system**: Creates single backup files (not timestamped duplicates)
78+
- **Auto-rebuild**: Automatically rebuilds the main taxonomy file after changes
79+
- **Progress tracking**: Shows exactly what was enhanced and which files were modified
80+
81+
The enhancement system only updates nodes that actually need improvement (missing descriptions or links) and preserves existing quality content.
82+
83+
**Note**: All enhancement utility scripts are organized in the `utilities/` directory. The main `enhance.py` script provides a convenient interface to access them.
84+
4685
## Multiple Language Support
4786

4887
This also now supports multiple languages! In addition to English, we have some preliminary entries for Japanese in a few spots. To add additional languages, you have to make updates in a few key spots:

enhance.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Main enhancement script - convenient entry point for AI-assisted content enhancement.
4+
"""
5+
6+
import sys
7+
import subprocess
8+
from pathlib import Path
9+
10+
def main():
11+
"""Main enhancement workflow."""
12+
if len(sys.argv) < 2:
13+
print("Creative Tech Taxonomy AI Enhancement Tools")
14+
print("==========================================")
15+
print()
16+
print("Usage:")
17+
print(" python enhance.py analyze # Analyze current state")
18+
print(" python enhance.py plan # Generate processing plan")
19+
print(" python enhance.py batch [N] # Process N batches (default: 5)")
20+
print(" python enhance.py single <file> # Process single batch file")
21+
print(" python enhance.py cleanup # Clean up backup files")
22+
print()
23+
print("Examples:")
24+
print(" python enhance.py analyze")
25+
print(" python enhance.py batch 3")
26+
print(" python enhance.py single sample_batch_for_api.json")
27+
return
28+
29+
command = sys.argv[1].lower()
30+
utilities_dir = Path("utilities")
31+
32+
if command == "analyze":
33+
subprocess.run([sys.executable, utilities_dir / "analyze_nodes.py"])
34+
35+
elif command == "plan":
36+
subprocess.run([sys.executable, utilities_dir / "efficient_enhance.py"])
37+
38+
elif command == "batch":
39+
max_batches = int(sys.argv[2]) if len(sys.argv) > 2 else 5
40+
subprocess.run([sys.executable, utilities_dir / "batch_process.py",
41+
"--max-batches", str(max_batches)])
42+
43+
elif command == "single":
44+
if len(sys.argv) < 3:
45+
print("Error: Please specify batch file")
46+
print("Usage: python enhance.py single <batch_file>")
47+
return
48+
batch_file = sys.argv[2]
49+
subprocess.run([sys.executable, utilities_dir / "apply_enhancements.py", batch_file])
50+
51+
elif command == "cleanup":
52+
subprocess.run([sys.executable, utilities_dir / "auto_cleanup.py"])
53+
54+
else:
55+
print(f"Unknown command: {command}")
56+
print("Run 'python enhance.py' for usage help")
57+
58+
if __name__ == "__main__":
59+
main()

0 commit comments

Comments
 (0)