[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XDTGQ05VM1ZYEN4C7S8BCR":3,"skill-same:01M6XDTGQ05VM1ZYEN4C7S8BCR":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":13,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6XDTGQ05VM1ZYEN4C7S8BCR","hierarchical-taxonomy-clustering",null,"Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.","Waaaalnut\u002Fskillsbench","Waaaalnut","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103995656?v=4","01M6XCS9K1V51EY3JMB7DGMX24","01M6XCS9Q4WPW88W62C55G1H44",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"clustering","taxonomy","hierarchical taxonomy clustering","product","analysis","Word","build","via","paths","multi","embedding","e-commerce","with","commerce","naming","recursive","2026-11-10 10:12:30",false,"---\nname: hierarchical-taxonomy-clustering\ndescription: Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.\n---\n\n# Hierarchical Taxonomy Clustering\n\nCreate a unified multi-level taxonomy from hierarchical category paths by clustering similar paths and automatically generating meaningful category names.\n\n## Problem\n\nGiven category paths from multiple sources (e.g., \"electronics -> computers -> laptops\"), create a unified taxonomy that groups similar paths across sources, generates meaningful category names, and produces a clean N-level hierarchy (typically 5 levels). The unified category taxonomy could be used to do analysis or metric tracking on products from different platform.\n\n## Methodology\n\n1. **Hierarchical Weighting**: Convert paths to embeddings with exponentially decaying weights (Level i gets weight 0.6^(i-1)) to signify the importance of category granularity\n2. **Recursive Clustering**: Hierarchically cluster at each level (10-20 clusters at L1, 3-20 at L2-L5) using cosine distance\n3. **Intelligent Naming**: Generate category names via weighted word frequency + lemmatization + bundle word logic\n4. **Quality Control**: Exclude all ancestor words (parent, grandparent, etc.), avoid ancestor path duplicates, clean special characters\n\n## Output\n\nDataFrame with added columns:\n- `unified_level_1`: Top-level category (e.g., \"electronic | device\")\n- `unified_level_2`: Second-level category (e.g., \"computer | laptop\")\n- `unified_level_3` through `unified_level_N`: Deeper levels\n\nCategory names use ` | ` separator, max 5 words, covering 70%+ of records in each cluster.\n\n## Installation\n\n```bash\npip install pandas numpy scipy sentence-transformers nltk tqdm\npython -c \"import nltk; nltk.download('wordnet'); nltk.download('omw-1.4')\"\n```\n\n## 4-Step Pipeline\n\n### Step 1: Load, Standardize, Filter and Merge (`step1_preprocessing_and_merge.py`)\n- **Input**: List of (DataFrame, source_name) tuples, each of the  with `category_path` column\n- **Process**: Per-source deduplication, text cleaning (remove &\u002F,\u002F'\u002F-\u002Fquotes,'and' or \"&\", \",\" and so on, lemmatize words as nouns), normalize delimiter to ` > `, depth filtering, prefix removal, then merge all sources. source_level should reflect the processed version of the source level name\n- **Output**: Merged DataFrame with `category_path`, `source`, `depth`, `source_level_1` through `source_level_N`\n\n### Step 2: Weighted Embeddings (`step2_weighted_embedding_generation.py`)\n- **Input**: DataFrame from Step 1\n- **Output**: Numpy embedding matrix (n_records × 384)\n- Weights: L1=1.0, L2=0.6, L3=0.36, L4=0.216, L5=0.1296 (exponential decay 0.6^(n-1))\n- **Performance**: For ~10,000 records, expect 2-5 minutes. Progress bar will show encoding status.\n\n### Step 3: Recursive Clustering (`step3_recursive_clustering_naming.py`)\n- **Input**: DataFrame + embeddings from Step 2\n- **Output**: Assignments dict {index → {level_1: ..., level_5: ...}}\n- Average linkage + cosine distance, 10-20 clusters at L1, 3-20 at L2-L5\n- Word-based naming: weighted frequency + lemmatization + coverage ≥70%\n- **Performance**: For ~10,000 records, expect 1-3 minutes for hierarchical clustering and naming. Be patient - the system is working through recursive levels.\n\n### Step 4: Export Results (`step4_result_assignments.py`)\n- **Input**: DataFrame + assignments from Step 3\n- **Output**:\n  - `unified_taxonomy_full.csv` - all records with unified categories\n  - `unified_taxonomy_hierarchy.csv` - unique taxonomy structure\n\n## Usage\n\n**Use `scripts\u002Fpipeline.py` to run the complete 4-step workflow.**\n\nSee `scripts\u002Fpipeline.py` for:\n- Complete implementation of all 4 steps\n- Example code for processing multiple sources\n- Command-line interface\n- Individual step usage (for advanced control)\n","# Hierarchical Taxonomy Clustering\n\nCreate a unified multi-level taxonomy from hierarchical category paths by clustering similar paths and automatically generating meaningful category names.\n\n## Problem\n\nGiven category paths from multiple sources (e.g., \"electronics -> computers -> laptops\"), create a unified taxonomy that groups similar paths across sources, generates meaningful category names, and produces a clean N-level hierarchy (typically 5 levels). The unified category taxonomy could be used to do analysis or metric tracking on products from different platform.\n\n## Methodology\n\n1. **Hierarchical Weighting**: Convert paths to embeddings with exponentially decaying weights (Level i gets weight 0.6^(i-1)) to signify the importance of category granularity\n2. **Recursive Clustering**: Hierarchically cluster at each level (10-20 clusters at L1, 3-20 at L2-L5) using cosine distance\n3. **Intelligent Naming**: Generate category names via weighted word frequency + lemmatization + bundle word logic\n4. **Quality Control**: Exclude all ancestor words (parent, grandparent, etc.), avoid ancestor path duplicates, clean special characters\n\n## Output\n\nDataFrame with added columns:\n- `unified_level_1`: Top-level category (e.g., \"electronic | device\")\n- `unified_level_2`: Second-level category (e.g., \"computer | laptop\")\n- `unified_level_3` through `unified_level_N`: Deeper levels\n\nCategory names use ` | ` separator, max 5 words, covering 70%+ of records in each cluster.\n\n## Installation\n\n```bash\npip install pandas numpy scipy sentence-transformers nltk tqdm\npython -c \"import nltk; nltk.download('wordnet'); nltk.download('omw-1.4')\"\n```\n\n## 4-Step Pipeline\n\n### Step 1: Load, Standardize, Filter and Merge (`step1_preprocessing_and_merge.py`)\n- **Input**: List of (DataFrame, source_name) tuples, each of the  with `category_path` column\n- **Process**: Per-source deduplication, text cleaning (remove &\u002F,\u002F'\u002F-\u002Fquotes,'and' or \"&\", \",\" and so on, lemmatize words as nouns), normalize delimiter to ` > `, depth filtering, prefix removal, then merge all sources. source_level should reflect the processed version of the source level name\n- **Output**: Merged DataFrame with `category_path`, `source`, `depth`, `source_level_1` through `source_level_N`\n\n### Step 2: Weighted Embeddings (`step2_weighted_embedding_generation.py`)\n- **Input**: DataFrame from Step 1\n- **Output**: Numpy embedding matrix (n_records × 384)\n- Weights: L1=1.0, L2=0.6, L3=0.36, L4=0.216, L5=0.1296 (exponential decay 0.6^(n-1))\n- **Performance**: For ~10,000 records, expect 2-5 minutes. Progress bar will show encoding status.\n\n### Step 3: Recursive Clustering (`step3_recursive_clustering_naming.py`)\n- **Input**: DataFrame + embeddings from Step 2\n- **Output**: Assignments dict {index → {level_1: ..., level_5: ...}}\n- Average linkage + cosine distance, 10-20 clusters at L1, 3-20 at L2-L5\n- Word-based naming: weighted frequency + lemmatization + coverage ≥70%\n- **Performance**: For ~10,000 records, expect 1-3 minutes for hierarchical clustering and naming. Be patient - the system is working through recursive levels.\n\n### Step 4: Export Results (`step4_result_assignments.py`)\n- **Input**: DataFrame + assignments from Step 3\n- **Output**:\n  - `unified_taxonomy_full.csv` - all records with unified categories\n  - `unified_taxonomy_hierarchy.csv` - unique taxonomy structure\n\n## Usage\n\n**Use `scripts\u002Fpipeline.py` to run the complete 4-step workflow.**\n\nSee `scripts\u002Fpipeline.py` for:\n- Complete implementation of all 4 steps\n- Example code for processing multiple sources\n- Command-line interface\n- Individual step usage (for advanced control)\n",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench","https:\u002F\u002Fgithub.com\u002FWaaaalnut","student of Zhejiang University","2026-04-21 23:16:23",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill hierarchical-taxonomy-clustering",{"tool":52,"command":53},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill hierarchical-taxonomy-clustering",{"tool":55,"command":56},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill hierarchical-taxonomy-clustering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002FSKILL.md",true,[60,66,70,74,78],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Fpipeline.py","SCRIPT","脚本",5069,"https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002Fscripts\u002Fpipeline.py",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Fstep1_preprocessing_and_merge.py",6672,"https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002Fscripts\u002Fstep1_preprocessing_and_merge.py",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Fstep2_weighted_embedding_generation.py",4257,"https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002Fscripts\u002Fstep2_weighted_embedding_generation.py",{"path":75,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fstep3_recursive_clustering_naming.py",13788,"https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002Fscripts\u002Fstep3_recursive_clustering_naming.py",{"path":79,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Fstep4_result_assignments.py",6860,"https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Ftaxonomy-tree-merge\u002Fenvironment\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002Fscripts\u002Fstep4_result_assignments.py",[83,97,112,140,161,180],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":93,"publishedAt":34},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[88],{"categoryNo":89,"categoryName":90,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[94,95,96],"data reconciliation","reconciliation","data",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":34},"01M6XEW8MNPMF1KRXV6ATGFRQF","speech-to-text","Transcribe video to timestamped text using Whisper tiny model (pre-installed).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-tutorial-indexer\u002Fenvironment\u002Fskills\u002Fspeech-to-text\u002FSKILL.md",[],[104,105,106,107,108,109,110,111],"speech","text","speech to text","transcribe video","whisper","model","Video","transcribe",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":123,"publishedAt":34},"01M6XEW3FQZP0T1RKQQJFXVY9T","video-processor","Process videos by removing segments and concatenating remaining parts. Use when you need to remove detected pauses\u002Fopenings from videos, create highlight reels, or batch process segment removals using ffmpeg filter_complex.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fvideo-processor\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[110,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],"processor","video processor","batch","create","reels","when","parts","segments","process","videos","you","segment","filter","ffmpeg","use","remove",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":147,"publishedAt":34},"01M6XEVXJ5KZ0NTY3XZKRY4AS1","silence-detector","Detect initial silence segments in audio\u002Fvideo using energy-based analysis. Use when you need to find low-energy periods at the start of recordings (title slides, setup time, pre-roll silence).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsilence-detector\u002FSKILL.md",[146],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},[148,149,150,151,129,134,152,153,154,155,156,131,157,158,110,22,159,160,138],"detector","silence detector","title","slides","time","energy","at","recordings","detect","find","Audio","start","setup",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":34},"01M6XEVT3NGRN1FT7JPMAPXS6M","segment-combiner","Combine multiple segment detection results into a unified list. Use when you need to merge segments from different detectors, prepare removal lists for video processing, or consolidate detection outputs.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsegment-combiner\u002FSKILL.md",[],[135,168,110,169,170,171,172,173,129,174,175,131,134,176,177,138,178,179],"segment combiner","detection","prepare","merge","video processing","for","outputs","combine","processing","consolidate","results","list",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":189,"publishedAt":34},"01M6XEVMPVASGS2KX86QK4FMT7","report-generator","Generate compression reports for video processing. Use when you need to create structured JSON reports with duration statistics, compression ratios, and segment details after video processing.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Freport-generator\u002FSKILL.md",[186],{"categoryNo":187,"categoryName":188,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000034","行政与办公人员",[190,191,192,135,129,173,134,30,176,193,194,195,138,172,196,110,197,198,127],"generator","report generator","report","statistics","structured","reports","json","compression","generate"]