{
  "schemaVersion": "1.0",
  "item": {
    "slug": "smar",
    "name": "smart_ocr",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/duykhangdangzn1/smar",
    "canonicalUrl": "https://clawhub.ai/duykhangdangzn1/smar",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/smar",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=smar",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "_meta.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/smar"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/smar",
    "agentPageUrl": "https://openagent3.xyz/skills/smar/agent",
    "manifestUrl": "https://openagent3.xyz/skills/smar/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/smar/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "This 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."
      },
      {
        "title": "How to Use",
        "body": "Provide the image or scanned document\nOptionally specify language(s) to detect\nI'll extract text with position and confidence data\n\nExample prompts:\n\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\""
      },
      {
        "title": "PaddleOCR Fundamentals",
        "body": "from 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})\")"
      },
      {
        "title": "Supported Languages",
        "body": "# 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"
      },
      {
        "title": "Configuration Options",
        "body": "from 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)"
      },
      {
        "title": "Processing Different Sources",
        "body": "Image Files\n\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\nPDF Files (Scanned)\n\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\nURLs and Bytes\n\nimport requests\nfrom io import BytesIO\n\n# From URL\nresponse = requests.get('https://example.com/image.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))"
      },
      {
        "title": "Result Processing",
        "body": "def 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']))"
      },
      {
        "title": "Text Layout Reconstruction",
        "body": "def 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) < 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)"
      },
      {
        "title": "Best Practices",
        "body": "Preprocess Images: Improve quality before OCR\nChoose Correct Language: Specify language for better accuracy\nHandle Multi-column: Process columns separately\nFilter Low Confidence: Skip results below threshold\nBatch Processing: Process multiple images efficiently"
      },
      {
        "title": "Image Preprocessing",
        "body": "from 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"
      },
      {
        "title": "Batch OCR with Progress",
        "body": "from 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"
      },
      {
        "title": "Example 1: Business Card Reader",
        "body": "from 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/first 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']}\")"
      },
      {
        "title": "Example 2: Receipt Scanner",
        "body": "from 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']}\")"
      },
      {
        "title": "Example 3: Multi-language Document",
        "body": "from 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'] < 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})\")"
      },
      {
        "title": "Limitations",
        "body": "Handwritten text accuracy varies\nVery small text may not be detected\nComplex backgrounds reduce accuracy\nRotated text needs angle classification\nGPU recommended for best performance"
      },
      {
        "title": "Installation",
        "body": "# 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"
      },
      {
        "title": "Resources",
        "body": "PaddleOCR GitHub\nModel Zoo\nMulti-language Support"
      }
    ],
    "body": "Smart OCR Skill\nOverview\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\nHow to Use\nProvide the image or scanned document\nOptionally specify language(s) to detect\nI'll extract text with position and confidence data\n\nExample prompts:\n\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\"\nDomain Knowledge\nPaddleOCR Fundamentals\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\nSupported Languages\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\nConfiguration Options\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\nProcessing Different Sources\nImage Files\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\nPDF Files (Scanned)\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\nURLs and Bytes\nimport requests\nfrom io import BytesIO\n\n# From URL\nresponse = requests.get('https://example.com/image.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\nResult Processing\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\nText Layout Reconstruction\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) < 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\nBest Practices\nPreprocess Images: Improve quality before OCR\nChoose Correct Language: Specify language for better accuracy\nHandle Multi-column: Process columns separately\nFilter Low Confidence: Skip results below threshold\nBatch Processing: Process multiple images efficiently\nCommon Patterns\nImage Preprocessing\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\nBatch OCR with Progress\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\nExamples\nExample 1: Business Card Reader\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/first 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\nExample 2: Receipt Scanner\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\nExample 3: Multi-language Document\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'] < 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\nLimitations\nHandwritten text accuracy varies\nVery small text may not be detected\nComplex backgrounds reduce accuracy\nRotated text needs angle classification\nGPU recommended for best performance\nInstallation\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\nResources\nPaddleOCR GitHub\nModel Zoo\nMulti-language Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/duykhangdangzn1/smar",
    "publisherUrl": "https://clawhub.ai/duykhangdangzn1/smar",
    "owner": "duykhangdangzn1",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/smar",
    "downloadUrl": "https://openagent3.xyz/downloads/smar",
    "agentUrl": "https://openagent3.xyz/skills/smar/agent",
    "manifestUrl": "https://openagent3.xyz/skills/smar/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/smar/agent.md"
  }
}