Schema
A Python implementation of SCHEMA - An Algorithm for Automated Product Taxonomy Mapping in E-commerce.
Install / Use
/learn @nudge/SchemaREADME
schema
A Python implementation of SCHEMA - An Algorithm for Automated Product Taxonomy Mapping in E-commerce.
Based on the SCHEMA algorithm proposed by Aanen, et al.
Ref: http://disi.unitn.it/~p2p/RelatedWork/Matching/Aanen_eswc_2012.pdf
Author: David Ng david@theopenlabel.com, nudgeee@gmail.com
Required modules
- nltk with wordnet download (see http://www.nltk.org/data.html)
- Levenshtein
- pyxdameraulevenshtein
Example usage
import schema
# create source and candidate paths
source_path = schema.Path().add_node(..)
candidate_paths = [schema.Path().add_node(..), ..]
# generate key paths and match
keypathgen = schema.KeyPathGenerator(source_path, candidate_paths)
source_key_path = keypathgen.source_key_path()
matched_key_paths, matched_paths = keypathgen.matched_candidate_key_paths()
# rank and print results
ranker = schema.KeyPathRanker()
for i,candidate_key_path in enumerate(matched_key_paths):
rank = ranker.rank(source_key_path, candidate_key_path)
print rank, matched_paths[i]
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
