data-cleaner

Normalizes Thai product names by converting digits, standardizing units, and removing promotional noise.

Updated Jul 12, 2025
One-click install
npx skills add https://github.com/kpayakv2/check-products --skill data-cleaner-kpayakv2
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-cleaner
Source: https://github.com/kpayakv2/check-products/tree/main/.agents/skills/data-cleaner
Command: npx skills add https://github.com/kpayakv2/check-products --skill data-cleaner-kpayakv2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas.

What problem does it solve? Thai retail product names arrive full of noise: Thai numerals, zero-width characters, duplicate spaces, promotional phrases like "ซื้อ 1 แถม 1", and inconsistent measurement units. Feeding this raw text into classification or deduplication pipelines degrades accuracy, so it must be normalized first. ## Core Features & Use Cases - Thai Text Normalization: Converts Thai digits to Arabic, strips zero-width characters, and collapses duplicate whitespace via the project's ThaiTextProcessor. - Unit Standardization: Rewrites units like "100 g", "100g", and "100ก." into a consistent form (ก., กก., มล., ล.). - Promotion & Noise Removal: Strips marketing phrases such as "ลด 50%" and "ราคาพิเศษ" before AI processing. - Batch Processing: Cleans entire product DataFrames with pandas, drops duplicates on the cleaned name, and filters out names shorter than 3 characters. - Use Case: Before importing a CSV of 5,000 retail product names into the taxonomy pipeline, run the batch cleaning pattern to normalize every name and remove duplicates. ## Quick Start Ask the AI to clean and normalize a list of Thai product names using the ThaiTextProcessor from fresh_implementations before running classification.

Frequently Asked Questions about data-cleaner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I normalize Thai product names in Python?▼

Use the ThaiTextProcessor class from fresh_implementations and call clean_text on each name. It converts Thai digits, removes zero-width characters, collapses whitespace, and standardizes units in one pass.

How to convert Thai digits to Arabic numerals in Python?▼

Use str.maketrans to map '๐๑๒๓๔๕๖๗๘๙' to '0123456789' and apply text.translate. The convert_thai_digits method in ThaiTextProcessor wraps this conversion.

How do I remove promotional text from product names?▼

Apply regex patterns matching phrases like 'ซื้อ 1 แถม 1', 'ลด 50%', 'ราคาพิเศษ', and 'โปรโมชั่น'. The remove_promotions method handles these common Thai retail noise patterns.

Should I clean product names before deduplication or classification?▼

Yes, always clean first. Comparing raw names directly is an anti-pattern because formatting differences create false mismatches. Clean, then drop duplicates on the normalized name column.

What are the limitations of regex-based Thai text cleaning?▼

Regex rules only cover known noise patterns and unit formats, so novel promotional wording may pass through. Parenthesized pack sizes like '(แพ็ค 4)' should be kept since they carry quantity information.