[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MVRAM4E4W0KAQ741E44X01":3,"skill-same:01M6MVRAM4E4W0KAQ741E44X01":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":25,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6MVRAM4E4W0KAQ741E44X01","smart-ocr",null,"Extract text from images and scanned documents using PaddleOCR - supports 100+ languages","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002FPDF及文件\u002Fsmart-ocr\u002FSKILL.md",[17,22],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000016","图像与多媒体",[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"smart ocr","ocr","computer","paddleocr","text-extraction","opus","sonnet","multilingual","images","operations","extract","image","text","execution","office","file","https","code","documents","github","2026-11-10 10:12:30",false,"---\nname: smart-ocr\ndescription: Extract text from images and scanned documents using PaddleOCR - supports 100+ languages\nauthor: claude-office-skills\nversion: \"1.0\"\ntags: [ocr, paddleocr, text-extraction, multilingual, image]\nmodels: [claude-sonnet-4, claude-opus-4]\ntools: [computer, code_execution, file_operations]\nlibrary:\n  name: PaddleOCR\n  url: https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR\n  stars: 69k\n---\n\n# Smart OCR Skill\n\n## Overview\n\nThis skill enables intelligent text extraction from images and scanned documents using **PaddleOCR** - a leading OCR engine supporting 100+ languages. Extract text from photos, screenshots, scanned PDFs, and handwritten documents with high accuracy.\n\n## How to Use\n\n1. Provide the image or scanned document\n2. Optionally specify language(s) to detect\n3. I'll extract text with position and confidence data\n\n**Example prompts:**\n- \"Extract all text from this screenshot\"\n- \"OCR this scanned PDF document\"\n- \"Read the text from this business card photo\"\n- \"Extract Chinese and English text from this image\"\n\n## Domain Knowledge\n\n### PaddleOCR Fundamentals\n\n```python\nfrom paddleocr import PaddleOCR\n\n# Initialize OCR engine\nocr = PaddleOCR(use_angle_cls=True, lang='en')\n\n# Run OCR on image\nresult = ocr.ocr('image.png', cls=True)\n\n# Result structure: [[box, (text, confidence)], ...]\nfor line in result[0]:\n    box = line[0]      # [[x1,y1], [x2,y2], [x3,y3], [x4,y4]]\n    text = line[1][0]  # Extracted text\n    conf = line[1][1]  # Confidence score\n    print(f\"{text} ({conf:.2f})\")\n```\n\n### Supported Languages\n\n```python\n# Common language codes\nlanguages = {\n    'en': 'English',\n    'ch': 'Chinese (Simplified)',\n    'cht': 'Chinese (Traditional)',\n    'japan': 'Japanese',\n    'korean': 'Korean',\n    'french': 'French',\n    'german': 'German',\n    'spanish': 'Spanish',\n    'russian': 'Russian',\n    'arabic': 'Arabic',\n    'hindi': 'Hindi',\n    'vi': 'Vietnamese',\n    'th': 'Thai',\n    # ... 100+ languages supported\n}\n\n# Use specific language\nocr = PaddleOCR(lang='ch')  # Chinese\nocr = PaddleOCR(lang='japan')  # Japanese\nocr = PaddleOCR(lang='multilingual')  # Auto-detect\n```\n\n### Configuration Options\n\n```python\nfrom paddleocr import PaddleOCR\n\nocr = PaddleOCR(\n    # Detection settings\n    det_model_dir=None,         # Custom detection model\n    det_limit_side_len=960,     # Max side length for detection\n    det_db_thresh=0.3,          # Binarization threshold\n    det_db_box_thresh=0.5,      # Box score threshold\n    \n    # Recognition settings\n    rec_model_dir=None,         # Custom recognition model\n    rec_char_dict_path=None,    # Custom character dictionary\n    \n    # Angle classification\n    use_angle_cls=True,         # Enable angle classification\n    cls_model_dir=None,         # Custom classification model\n    \n    # Language\n    lang='en',                  # Language code\n    \n    # Performance\n    use_gpu=True,               # Use GPU if available\n    gpu_mem=500,                # GPU memory limit (MB)\n    enable_mkldnn=True,         # CPU optimization\n    \n    # Output\n    show_log=False,             # Suppress logs\n)\n```\n\n### Processing Different Sources\n\n#### Image Files\n```python\n# Single image\nresult = ocr.ocr('image.png')\n\n# Multiple images\nimages = ['img1.png', 'img2.png', 'img3.png']\nfor img in images:\n    result = ocr.ocr(img)\n    process_result(result)\n```\n\n#### PDF Files (Scanned)\n```python\nfrom pdf2image import convert_from_path\n\ndef ocr_pdf(pdf_path):\n    \"\"\"OCR a scanned PDF.\"\"\"\n    # Convert PDF pages to images\n    images = convert_from_path(pdf_path)\n    \n    all_text = []\n    for i, img in enumerate(images):\n        # Save temp image\n        temp_path = f'temp_page_{i}.png'\n        img.save(temp_path)\n        \n        # OCR the image\n        result = ocr.ocr(temp_path)\n        \n        # Extract text\n        page_text = '\\n'.join([line[1][0] for line in result[0]])\n        all_text.append(f\"--- Page {i+1} ---\\n{page_text}\")\n        \n        os.remove(temp_path)\n    \n    return '\\n\\n'.join(all_text)\n```\n\n#### URLs and Bytes\n```python\nimport requests\nfrom io import BytesIO\n\n# From URL\nresponse = requests.get('https:\u002F\u002Fexample.com\u002Fimage.png')\nresult = ocr.ocr(BytesIO(response.content))\n\n# From bytes\nwith open('image.png', 'rb') as f:\n    img_bytes = f.read()\nresult = ocr.ocr(BytesIO(img_bytes))\n```\n\n### Result Processing\n\n```python\ndef process_ocr_result(result):\n    \"\"\"Process OCR result into structured data.\"\"\"\n    \n    lines = []\n    for line in result[0]:\n        box = line[0]\n        text = line[1][0]\n        confidence = line[1][1]\n        \n        # Calculate bounding box\n        x_coords = [p[0] for p in box]\n        y_coords = [p[1] for p in box]\n        \n        lines.append({\n            'text': text,\n            'confidence': confidence,\n            'bbox': {\n                'left': min(x_coords),\n                'top': min(y_coords),\n                'right': max(x_coords),\n                'bottom': max(y_coords),\n            },\n            'raw_box': box\n        })\n    \n    return lines\n\n# Sort by position (top to bottom, left to right)\ndef sort_by_position(lines):\n    return sorted(lines, key=lambda x: (x['bbox']['top'], x['bbox']['left']))\n```\n\n### Text Layout Reconstruction\n\n```python\ndef reconstruct_layout(result, line_threshold=10):\n    \"\"\"Reconstruct text layout from OCR results.\"\"\"\n    \n    lines = process_ocr_result(result)\n    lines = sort_by_position(lines)\n    \n    # Group into logical lines\n    text_lines = []\n    current_line = []\n    current_y = None\n    \n    for line in lines:\n        y = line['bbox']['top']\n        \n        if current_y is None or abs(y - current_y) \u003C line_threshold:\n            current_line.append(line)\n            current_y = y\n        else:\n            # New line\n            text_lines.append(' '.join([l['text'] for l in current_line]))\n            current_line = [line]\n            current_y = y\n    \n    # Add last line\n    if current_line:\n        text_lines.append(' '.join([l['text'] for l in current_line]))\n    \n    return '\\n'.join(text_lines)\n```\n\n## Best Practices\n\n1. **Preprocess Images**: Improve quality before OCR\n2. **Choose Correct Language**: Specify language for better accuracy\n3. **Handle Multi-column**: Process columns separately\n4. **Filter Low Confidence**: Skip results below threshold\n5. **Batch Processing**: Process multiple images efficiently\n\n## Common Patterns\n\n### Image Preprocessing\n```python\nfrom PIL import Image, ImageEnhance, ImageFilter\n\ndef preprocess_image(image_path):\n    \"\"\"Preprocess image for better OCR.\"\"\"\n    img = Image.open(image_path)\n    \n    # Convert to grayscale\n    img = img.convert('L')\n    \n    # Enhance contrast\n    enhancer = ImageEnhance.Contrast(img)\n    img = enhancer.enhance(2.0)\n    \n    # Sharpen\n    img = img.filter(ImageFilter.SHARPEN)\n    \n    # Save preprocessed\n    preprocessed_path = 'preprocessed.png'\n    img.save(preprocessed_path)\n    \n    return preprocessed_path\n```\n\n### Batch OCR with Progress\n```python\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor\n\ndef batch_ocr(image_paths, max_workers=4):\n    \"\"\"OCR multiple images in parallel.\"\"\"\n    \n    results = {}\n    \n    def process_single(img_path):\n        result = ocr.ocr(img_path)\n        return img_path, result\n    \n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        futures = [executor.submit(process_single, p) for p in image_paths]\n        \n        for future in tqdm(futures, desc=\"Processing OCR\"):\n            path, result = future.result()\n            results[path] = result\n    \n    return results\n```\n\n## Examples\n\n### Example 1: Business Card Reader\n```python\nfrom paddleocr import PaddleOCR\nimport re\n\ndef read_business_card(image_path):\n    \"\"\"Extract contact info from business card.\"\"\"\n    \n    ocr = PaddleOCR(use_angle_cls=True, lang='en')\n    result = ocr.ocr(image_path)\n    \n    # Extract all text\n    all_text = []\n    for line in result[0]:\n        all_text.append(line[1][0])\n    \n    full_text = '\\n'.join(all_text)\n    \n    # Parse contact info\n    contact = {\n        'name': None,\n        'email': None,\n        'phone': None,\n        'company': None,\n        'title': None,\n        'raw_text': full_text\n    }\n    \n    # Email pattern\n    email_match = re.search(r'[\\w\\.-]+@[\\w\\.-]+\\.\\w+', full_text)\n    if email_match:\n        contact['email'] = email_match.group()\n    \n    # Phone pattern\n    phone_match = re.search(r'[\\+\\d][\\d\\s\\-\\(\\)]{8,}', full_text)\n    if phone_match:\n        contact['phone'] = phone_match.group().strip()\n    \n    # Name is usually the largest\u002Ffirst text\n    if all_text:\n        contact['name'] = all_text[0]\n    \n    return contact\n\ncard_info = read_business_card('business_card.jpg')\nprint(f\"Name: {card_info['name']}\")\nprint(f\"Email: {card_info['email']}\")\nprint(f\"Phone: {card_info['phone']}\")\n```\n\n### Example 2: Receipt Scanner\n```python\nfrom paddleocr import PaddleOCR\nimport re\n\ndef scan_receipt(image_path):\n    \"\"\"Extract items and total from receipt.\"\"\"\n    \n    ocr = PaddleOCR(use_angle_cls=True, lang='en')\n    result = ocr.ocr(image_path)\n    \n    lines = []\n    for line in result[0]:\n        text = line[1][0]\n        y_pos = line[0][0][1]\n        lines.append({'text': text, 'y': y_pos})\n    \n    # Sort by vertical position\n    lines.sort(key=lambda x: x['y'])\n    \n    receipt = {\n        'items': [],\n        'subtotal': None,\n        'tax': None,\n        'total': None\n    }\n    \n    for line in lines:\n        text = line['text']\n        \n        # Look for total\n        if 'total' in text.lower():\n            amount = re.search(r'\\$?([\\d,]+\\.?\\d*)', text)\n            if amount:\n                if 'sub' in text.lower():\n                    receipt['subtotal'] = float(amount.group(1).replace(',', ''))\n                else:\n                    receipt['total'] = float(amount.group(1).replace(',', ''))\n        \n        # Look for tax\n        elif 'tax' in text.lower():\n            amount = re.search(r'\\$?([\\d,]+\\.?\\d*)', text)\n            if amount:\n                receipt['tax'] = float(amount.group(1).replace(',', ''))\n        \n        # Look for items (line with price)\n        else:\n            item_match = re.search(r'(.+?)\\s+\\$?([\\d,]+\\.?\\d+)$', text)\n            if item_match:\n                receipt['items'].append({\n                    'name': item_match.group(1).strip(),\n                    'price': float(item_match.group(2).replace(',', ''))\n                })\n    \n    return receipt\n\nreceipt_data = scan_receipt('receipt.jpg')\nprint(f\"Items: {len(receipt_data['items'])}\")\nprint(f\"Total: ${receipt_data['total']}\")\n```\n\n### Example 3: Multi-language Document\n```python\nfrom paddleocr import PaddleOCR\n\ndef ocr_multilingual(image_path, languages=['en', 'ch']):\n    \"\"\"OCR document with multiple languages.\"\"\"\n    \n    all_results = {}\n    \n    for lang in languages:\n        ocr = PaddleOCR(use_angle_cls=True, lang=lang)\n        result = ocr.ocr(image_path)\n        \n        texts = []\n        for line in result[0]:\n            texts.append({\n                'text': line[1][0],\n                'confidence': line[1][1]\n            })\n        \n        all_results[lang] = texts\n    \n    # Merge results, keeping highest confidence\n    merged = {}\n    for lang, texts in all_results.items():\n        for item in texts:\n            text = item['text']\n            conf = item['confidence']\n            \n            if text not in merged or merged[text]['confidence'] \u003C conf:\n                merged[text] = {'confidence': conf, 'language': lang}\n    \n    return merged\n\nresult = ocr_multilingual('bilingual_document.png')\nfor text, info in result.items():\n    print(f\"[{info['language']}] {text} ({info['confidence']:.2f})\")\n```\n\n## Limitations\n\n- Handwritten text accuracy varies\n- Very small text may not be detected\n- Complex backgrounds reduce accuracy\n- Rotated text needs angle classification\n- GPU recommended for best performance\n\n## Installation\n\n```bash\n# CPU version\npip install paddlepaddle paddleocr\n\n# GPU version (CUDA 11.x)\npip install paddlepaddle-gpu paddleocr\n\n# Additional dependencies\npip install pdf2image Pillow\n```\n\n## Resources\n\n- [PaddleOCR GitHub](https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR)\n- [Model Zoo](https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR\u002Fblob\u002Frelease\u002F2.7\u002Fdoc\u002Fdoc_en\u002Fmodels_list_en.md)\n- [Multi-language Support](https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR\u002Fblob\u002Frelease\u002F2.7\u002Fdoc\u002Fdoc_en\u002Fmulti_languages_en.md)\n","# Smart OCR Skill\n\n## Overview\n\nThis skill enables intelligent text extraction from images and scanned documents using **PaddleOCR** - a leading OCR engine supporting 100+ languages. Extract text from photos, screenshots, scanned PDFs, and handwritten documents with high accuracy.\n\n## How to Use\n\n1. Provide the image or scanned document\n2. Optionally specify language(s) to detect\n3. I'll extract text with position and confidence data\n\n**Example prompts:**\n- \"Extract all text from this screenshot\"\n- \"OCR this scanned PDF document\"\n- \"Read the text from this business card photo\"\n- \"Extract Chinese and English text from this image\"\n\n## Domain Knowledge\n\n### PaddleOCR Fundamentals\n\n```python\nfrom paddleocr import PaddleOCR\n\n# Initialize OCR engine\nocr = PaddleOCR(use_angle_cls=True, lang='en')\n\n# Run OCR on image\nresult = ocr.ocr('image.png', cls=True)\n\n# Result structure: [[box, (text, confidence)], ...]\nfor line in result[0]:\n    box = line[0]      # [[x1,y1], [x2,y2], [x3,y3], [x4,y4]]\n    text = line[1][0]  # Extracted text\n    conf = line[1][1]  # Confidence score\n    print(f\"{text} ({conf:.2f})\")\n```\n\n### Supported Languages\n\n```python\n# Common language codes\nlanguages = {\n    'en': 'English',\n    'ch': 'Chinese (Simplified)',\n    'cht': 'Chinese (Traditional)',\n    'japan': 'Japanese',\n    'korean': 'Korean',\n    'french': 'French',\n    'german': 'German',\n    'spanish': 'Spanish',\n    'russian': 'Russian',\n    'arabic': 'Arabic',\n    'hindi': 'Hindi',\n    'vi': 'Vietnamese',\n    'th': 'Thai',\n    # ... 100+ languages supported\n}\n\n# Use specific language\nocr = PaddleOCR(lang='ch')  # Chinese\nocr = PaddleOCR(lang='japan')  # Japanese\nocr = PaddleOCR(lang='multilingual')  # Auto-detect\n```\n\n### Configuration Options\n\n```python\nfrom paddleocr import PaddleOCR\n\nocr = PaddleOCR(\n    # Detection settings\n    det_model_dir=None,         # Custom detection model\n    det_limit_side_len=960,     # Max side length for detection\n    det_db_thresh=0.3,          # Binarization threshold\n    det_db_box_thresh=0.5,      # Box score threshold\n    \n    # Recognition settings\n    rec_model_dir=None,         # Custom recognition model\n    rec_char_dict_path=None,    # Custom character dictionary\n    \n    # Angle classification\n    use_angle_cls=True,         # Enable angle classification\n    cls_model_dir=None,         # Custom classification model\n    \n    # Language\n    lang='en',                  # Language code\n    \n    # Performance\n    use_gpu=True,               # Use GPU if available\n    gpu_mem=500,                # GPU memory limit (MB)\n    enable_mkldnn=True,         # CPU optimization\n    \n    # Output\n    show_log=False,             # Suppress logs\n)\n```\n\n### Processing Different Sources\n\n#### Image Files\n```python\n# Single image\nresult = ocr.ocr('image.png')\n\n# Multiple images\nimages = ['img1.png', 'img2.png', 'img3.png']\nfor img in images:\n    result = ocr.ocr(img)\n    process_result(result)\n```\n\n#### PDF Files (Scanned)\n```python\nfrom pdf2image import convert_from_path\n\ndef ocr_pdf(pdf_path):\n    \"\"\"OCR a scanned PDF.\"\"\"\n    # Convert PDF pages to images\n    images = convert_from_path(pdf_path)\n    \n    all_text = []\n    for i, img in enumerate(images):\n        # Save temp image\n        temp_path = f'temp_page_{i}.png'\n        img.save(temp_path)\n        \n        # OCR the image\n        result = ocr.ocr(temp_path)\n        \n        # Extract text\n        page_text = '\\n'.join([line[1][0] for line in result[0]])\n        all_text.append(f\"--- Page {i+1} ---\\n{page_text}\")\n        \n        os.remove(temp_path)\n    \n    return '\\n\\n'.join(all_text)\n```\n\n#### URLs and Bytes\n```python\nimport requests\nfrom io import BytesIO\n\n# From URL\nresponse = requests.get('https:\u002F\u002Fexample.com\u002Fimage.png')\nresult = ocr.ocr(BytesIO(response.content))\n\n# From bytes\nwith open('image.png', 'rb') as f:\n    img_bytes = f.read()\nresult = ocr.ocr(BytesIO(img_bytes))\n```\n\n### Result Processing\n\n```python\ndef process_ocr_result(result):\n    \"\"\"Process OCR result into structured data.\"\"\"\n    \n    lines = []\n    for line in result[0]:\n        box = line[0]\n        text = line[1][0]\n        confidence = line[1][1]\n        \n        # Calculate bounding box\n        x_coords = [p[0] for p in box]\n        y_coords = [p[1] for p in box]\n        \n        lines.append({\n            'text': text,\n            'confidence': confidence,\n            'bbox': {\n                'left': min(x_coords),\n                'top': min(y_coords),\n                'right': max(x_coords),\n                'bottom': max(y_coords),\n            },\n            'raw_box': box\n        })\n    \n    return lines\n\n# Sort by position (top to bottom, left to right)\ndef sort_by_position(lines):\n    return sorted(lines, key=lambda x: (x['bbox']['top'], x['bbox']['left']))\n```\n\n### Text Layout Reconstruction\n\n```python\ndef reconstruct_layout(result, line_threshold=10):\n    \"\"\"Reconstruct text layout from OCR results.\"\"\"\n    \n    lines = process_ocr_result(result)\n    lines = sort_by_position(lines)\n    \n    # Group into logical lines\n    text_lines = []\n    current_line = []\n    current_y = None\n    \n    for line in lines:\n        y = line['bbox']['top']\n        \n        if current_y is None or abs(y - current_y) \u003C line_threshold:\n            current_line.append(line)\n            current_y = y\n        else:\n            # New line\n            text_lines.append(' '.join([l['text'] for l in current_line]))\n            current_line = [line]\n            current_y = y\n    \n    # Add last line\n    if current_line:\n        text_lines.append(' '.join([l['text'] for l in current_line]))\n    \n    return '\\n'.join(text_lines)\n```\n\n## Best Practices\n\n1. **Preprocess Images**: Improve quality before OCR\n2. **Choose Correct Language**: Specify language for better accuracy\n3. **Handle Multi-column**: Process columns separately\n4. **Filter Low Confidence**: Skip results below threshold\n5. **Batch Processing**: Process multiple images efficiently\n\n## Common Patterns\n\n### Image Preprocessing\n```python\nfrom PIL import Image, ImageEnhance, ImageFilter\n\ndef preprocess_image(image_path):\n    \"\"\"Preprocess image for better OCR.\"\"\"\n    img = Image.open(image_path)\n    \n    # Convert to grayscale\n    img = img.convert('L')\n    \n    # Enhance contrast\n    enhancer = ImageEnhance.Contrast(img)\n    img = enhancer.enhance(2.0)\n    \n    # Sharpen\n    img = img.filter(ImageFilter.SHARPEN)\n    \n    # Save preprocessed\n    preprocessed_path = 'preprocessed.png'\n    img.save(preprocessed_path)\n    \n    return preprocessed_path\n```\n\n### Batch OCR with Progress\n```python\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor\n\ndef batch_ocr(image_paths, max_workers=4):\n    \"\"\"OCR multiple images in parallel.\"\"\"\n    \n    results = {}\n    \n    def process_single(img_path):\n        result = ocr.ocr(img_path)\n        return img_path, result\n    \n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        futures = [executor.submit(process_single, p) for p in image_paths]\n        \n        for future in tqdm(futures, desc=\"Processing OCR\"):\n            path, result = future.result()\n            results[path] = result\n    \n    return results\n```\n\n## Examples\n\n### Example 1: Business Card Reader\n```python\nfrom paddleocr import PaddleOCR\nimport re\n\ndef read_business_card(image_path):\n    \"\"\"Extract contact info from business card.\"\"\"\n    \n    ocr = PaddleOCR(use_angle_cls=True, lang='en')\n    result = ocr.ocr(image_path)\n    \n    # Extract all text\n    all_text = []\n    for line in result[0]:\n        all_text.append(line[1][0])\n    \n    full_text = '\\n'.join(all_text)\n    \n    # Parse contact info\n    contact = {\n        'name': None,\n        'email': None,\n        'phone': None,\n        'company': None,\n        'title': None,\n        'raw_text': full_text\n    }\n    \n    # Email pattern\n    email_match = re.search(r'[\\w\\.-]+@[\\w\\.-]+\\.\\w+', full_text)\n    if email_match:\n        contact['email'] = email_match.group()\n    \n    # Phone pattern\n    phone_match = re.search(r'[\\+\\d][\\d\\s\\-\\(\\)]{8,}', full_text)\n    if phone_match:\n        contact['phone'] = phone_match.group().strip()\n    \n    # Name is usually the largest\u002Ffirst text\n    if all_text:\n        contact['name'] = all_text[0]\n    \n    return contact\n\ncard_info = read_business_card('business_card.jpg')\nprint(f\"Name: {card_info['name']}\")\nprint(f\"Email: {card_info['email']}\")\nprint(f\"Phone: {card_info['phone']}\")\n```\n\n### Example 2: Receipt Scanner\n```python\nfrom paddleocr import PaddleOCR\nimport re\n\ndef scan_receipt(image_path):\n    \"\"\"Extract items and total from receipt.\"\"\"\n    \n    ocr = PaddleOCR(use_angle_cls=True, lang='en')\n    result = ocr.ocr(image_path)\n    \n    lines = []\n    for line in result[0]:\n        text = line[1][0]\n        y_pos = line[0][0][1]\n        lines.append({'text': text, 'y': y_pos})\n    \n    # Sort by vertical position\n    lines.sort(key=lambda x: x['y'])\n    \n    receipt = {\n        'items': [],\n        'subtotal': None,\n        'tax': None,\n        'total': None\n    }\n    \n    for line in lines:\n        text = line['text']\n        \n        # Look for total\n        if 'total' in text.lower():\n            amount = re.search(r'\\$?([\\d,]+\\.?\\d*)', text)\n            if amount:\n                if 'sub' in text.lower():\n                    receipt['subtotal'] = float(amount.group(1).replace(',', ''))\n                else:\n                    receipt['total'] = float(amount.group(1).replace(',', ''))\n        \n        # Look for tax\n        elif 'tax' in text.lower():\n            amount = re.search(r'\\$?([\\d,]+\\.?\\d*)', text)\n            if amount:\n                receipt['tax'] = float(amount.group(1).replace(',', ''))\n        \n        # Look for items (line with price)\n        else:\n            item_match = re.search(r'(.+?)\\s+\\$?([\\d,]+\\.?\\d+)$', text)\n            if item_match:\n                receipt['items'].append({\n                    'name': item_match.group(1).strip(),\n                    'price': float(item_match.group(2).replace(',', ''))\n                })\n    \n    return receipt\n\nreceipt_data = scan_receipt('receipt.jpg')\nprint(f\"Items: {len(receipt_data['items'])}\")\nprint(f\"Total: ${receipt_data['total']}\")\n```\n\n### Example 3: Multi-language Document\n```python\nfrom paddleocr import PaddleOCR\n\ndef ocr_multilingual(image_path, languages=['en', 'ch']):\n    \"\"\"OCR document with multiple languages.\"\"\"\n    \n    all_results = {}\n    \n    for lang in languages:\n        ocr = PaddleOCR(use_angle_cls=True, lang=lang)\n        result = ocr.ocr(image_path)\n        \n        texts = []\n        for line in result[0]:\n            texts.append({\n                'text': line[1][0],\n                'confidence': line[1][1]\n            })\n        \n        all_results[lang] = texts\n    \n    # Merge results, keeping highest confidence\n    merged = {}\n    for lang, texts in all_results.items():\n        for item in texts:\n            text = item['text']\n            conf = item['confidence']\n            \n            if text not in merged or merged[text]['confidence'] \u003C conf:\n                merged[text] = {'confidence': conf, 'language': lang}\n    \n    return merged\n\nresult = ocr_multilingual('bilingual_document.png')\nfor text, info in result.items():\n    print(f\"[{info['language']}] {text} ({info['confidence']:.2f})\")\n```\n\n## Limitations\n\n- Handwritten text accuracy varies\n- Very small text may not be detected\n- Complex backgrounds reduce accuracy\n- Rotated text needs angle classification\n- GPU recommended for best performance\n\n## Installation\n\n```bash\n# CPU version\npip install paddlepaddle paddleocr\n\n# GPU version (CUDA 11.x)\npip install paddlepaddle-gpu paddleocr\n\n# Additional dependencies\npip install pdf2image Pillow\n```\n\n## Resources\n\n- [PaddleOCR GitHub](https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR)\n- [Model Zoo](https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR\u002Fblob\u002Frelease\u002F2.7\u002Fdoc\u002Fdoc_en\u002Fmodels_list_en.md)\n- [Multi-language Support](https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR\u002Fblob\u002Frelease\u002F2.7\u002Fdoc\u002Fdoc_en\u002Fmulti_languages_en.md)\n",{"name":5,"tags":51,"tools":52,"author":55,"models":56,"library":59,"version":63,"description":7},[27,29,30,33,37],[28,53,54],"code_execution","file_operations","claude-office-skills",[57,58],"claude-sonnet-4","claude-opus-4",{"url":60,"name":61,"stars":62},"https:\u002F\u002Fgithub.com\u002FPaddlePaddle\u002FPaddleOCR","PaddleOCR","69k","1.0","main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","PDF及文件\u002Fsmart-ocr",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill smart-ocr",{"tool":78,"command":79},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill smart-ocr",{"tool":81,"command":82},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill smart-ocr","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002FPDF及文件\u002Fsmart-ocr\u002FSKILL.md",true,[86],{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"_meta.json","REFERENCE","参考文档",278,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002FPDF及文件\u002Fsmart-ocr\u002F_meta.json",[93,117,151,162,172,200],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":46},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[95,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116],"safe","ethereum","defi","Optimization","user","use","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":118,"name":119,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":133,"publishedAt":46},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[122,125,128],{"categoryNo":123,"categoryName":124,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":126,"categoryName":127,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":129,"categoryName":130,"taxonomyType":131,"taxonomyTypeDesc":132},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[134,135,136,137,138,139,140,102,141,106,142,143,144,145,146,147,148,149,150],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":152,"name":153,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":159,"publishedAt":46},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[156,157,158],{"categoryNo":123,"categoryName":124,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":126,"categoryName":127,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":129,"categoryName":130,"taxonomyType":131,"taxonomyTypeDesc":132},[134,160,161,135,136,137,138,139,140,102,141,106,143,144,145,146,147,148,149,150],"api skill","zerion api skill",{"skillNo":163,"name":164,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":170,"publishedAt":46},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[167,168,169],{"categoryNo":123,"categoryName":124,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":126,"categoryName":127,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":129,"categoryName":130,"taxonomyType":131,"taxonomyTypeDesc":132},[137,134,171,135,136,138,139,102,141,106,142,143,144,145,146,147,148,149,150],"zerion api mcp",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":181,"publishedAt":46},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[178],{"categoryNo":179,"categoryName":180,"taxonomyType":131,"taxonomyTypeDesc":132},"01JBSEEDCAT000000000000040","财务",[182,183,184,185,186,45,42,187,188,189,190,191,192,193,194,195,196,197,198,199],"finance","yahoo finance","forex","yahoo","yahoo finance forex","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":207,"publishedAt":46},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[206],{"categoryNo":179,"categoryName":180,"taxonomyType":131,"taxonomyTypeDesc":132},[182,183,185,208,209,210,211,212,213,191,214,215,216,217,218,219,220,221,150,198],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]