[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MVD16TXPPZ2Z8B7RWWYH02":3,"skill-same:01M6MVD16TXPPZ2Z8B7RWWYH02":84},{"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":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6MVD16TXPPZ2Z8B7RWWYH02","doc-parser",null,"Parse complex documents with IBM's docling - handles tables, figures, and multi-column layouts","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及文件\u002Fdoc-parser\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"doc","doc parser","parser","document","tables","document-parsing","opus","sonnet","figures","with","multi","layout","documents","computer","parsing","execution","ibm","office","file","code","2026-11-10 10:12:30",false,"---\nname: doc-parser\ndescription: Parse complex documents with IBM's docling - handles tables, figures, and multi-column layouts\nauthor: claude-office-skills\nversion: \"1.0\"\ntags: [document-parsing, docling, ibm, tables, layout]\nmodels: [claude-sonnet-4, claude-opus-4]\ntools: [computer, code_execution, file_operations]\nlibrary:\n  name: docling\n  url: https:\u002F\u002Fgithub.com\u002FDS4SD\u002Fdocling\n  stars: 51.5k\n---\n\n# Document Parser Skill\n\n## Overview\n\nThis skill enables advanced document parsing using **docling** - IBM's state-of-the-art document understanding library. Parse complex PDFs, Word documents, and images while preserving structure, extracting tables, figures, and handling multi-column layouts.\n\n## How to Use\n\n1. Provide the document to parse\n2. Specify what you want to extract (text, tables, figures, etc.)\n3. I'll parse it and return structured data\n\n**Example prompts:**\n- \"Parse this PDF and extract all tables\"\n- \"Convert this academic paper to structured markdown\"\n- \"Extract figures and captions from this document\"\n- \"Parse this report preserving the document structure\"\n\n## Domain Knowledge\n\n### docling Fundamentals\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Initialize converter\nconverter = DocumentConverter()\n\n# Convert document\nresult = converter.convert(\"document.pdf\")\n\n# Access parsed content\ndoc = result.document\nprint(doc.export_to_markdown())\n```\n\n### Supported Formats\n\n| Format | Extension | Notes |\n|--------|-----------|-------|\n| PDF | .pdf | Native and scanned |\n| Word | .docx | Full structure preserved |\n| PowerPoint | .pptx | Slides as sections |\n| Images | .png, .jpg | OCR + layout analysis |\n| HTML | .html | Structure preserved |\n\n### Basic Usage\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Create converter\nconverter = DocumentConverter()\n\n# Convert single document\nresult = converter.convert(\"report.pdf\")\n\n# Access document\ndoc = result.document\n\n# Export options\nmarkdown = doc.export_to_markdown()\ntext = doc.export_to_text()\njson_doc = doc.export_to_dict()\n```\n\n### Advanced Configuration\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom docling.datamodel.base_models import InputFormat\nfrom docling.datamodel.pipeline_options import PdfPipelineOptions\n\n# Configure pipeline\npipeline_options = PdfPipelineOptions()\npipeline_options.do_ocr = True\npipeline_options.do_table_structure = True\npipeline_options.table_structure_options.do_cell_matching = True\n\n# Create converter with options\nconverter = DocumentConverter(\n    allowed_formats=[InputFormat.PDF, InputFormat.DOCX],\n    pdf_backend_options=pipeline_options\n)\n\nresult = converter.convert(\"document.pdf\")\n```\n\n### Document Structure\n\n```python\n# Document hierarchy\ndoc = result.document\n\n# Access metadata\nprint(doc.name)\nprint(doc.origin)\n\n# Iterate through content\nfor element in doc.iterate_items():\n    print(f\"Type: {element.type}\")\n    print(f\"Text: {element.text}\")\n    \n    if element.type == \"table\":\n        print(f\"Rows: {len(element.data.table_cells)}\")\n```\n\n### Extracting Tables\n\n```python\nfrom docling.document_converter import DocumentConverter\nimport pandas as pd\n\ndef extract_tables(doc_path):\n    \"\"\"Extract all tables from document.\"\"\"\n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    tables = []\n    \n    for element in doc.iterate_items():\n        if element.type == \"table\":\n            # Get table data\n            table_data = element.export_to_dataframe()\n            tables.append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'dataframe': table_data\n            })\n    \n    return tables\n\n# Usage\ntables = extract_tables(\"report.pdf\")\nfor i, table in enumerate(tables):\n    print(f\"Table {i+1} on page {table['page']}:\")\n    print(table['dataframe'])\n```\n\n### Extracting Figures\n\n```python\ndef extract_figures(doc_path, output_dir):\n    \"\"\"Extract figures with captions.\"\"\"\n    import os\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    figures = []\n    os.makedirs(output_dir, exist_ok=True)\n    \n    for element in doc.iterate_items():\n        if element.type == \"picture\":\n            figure_info = {\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'page': element.prov[0].page_no if element.prov else None,\n            }\n            \n            # Save image if available\n            if hasattr(element, 'image'):\n                img_path = os.path.join(output_dir, f\"figure_{len(figures)+1}.png\")\n                element.image.save(img_path)\n                figure_info['path'] = img_path\n            \n            figures.append(figure_info)\n    \n    return figures\n```\n\n### Handling Multi-column Layouts\n\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_multicolumn(doc_path):\n    \"\"\"Parse document with multi-column layout.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    # docling automatically handles column detection\n    # Text is returned in reading order\n    \n    structured_content = []\n    \n    for element in doc.iterate_items():\n        content_item = {\n            'type': element.type,\n            'text': element.text if hasattr(element, 'text') else None,\n            'level': element.level if hasattr(element, 'level') else None,\n        }\n        \n        # Add bounding box if available\n        if element.prov:\n            content_item['bbox'] = element.prov[0].bbox\n            content_item['page'] = element.prov[0].page_no\n        \n        structured_content.append(content_item)\n    \n    return structured_content\n```\n\n### Export Formats\n\n```python\nfrom docling.document_converter import DocumentConverter\n\nconverter = DocumentConverter()\nresult = converter.convert(\"document.pdf\")\ndoc = result.document\n\n# Markdown export\nmarkdown = doc.export_to_markdown()\nwith open(\"output.md\", \"w\") as f:\n    f.write(markdown)\n\n# Plain text\ntext = doc.export_to_text()\n\n# JSON\u002Fdict format\njson_doc = doc.export_to_dict()\n\n# HTML format (if supported)\n# html = doc.export_to_html()\n```\n\n### Batch Processing\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom pathlib import Path\nfrom concurrent.futures import ThreadPoolExecutor\n\ndef batch_parse(input_dir, output_dir, max_workers=4):\n    \"\"\"Parse multiple documents in parallel.\"\"\"\n    \n    input_path = Path(input_dir)\n    output_path = Path(output_dir)\n    output_path.mkdir(exist_ok=True)\n    \n    converter = DocumentConverter()\n    \n    def process_single(doc_path):\n        try:\n            result = converter.convert(str(doc_path))\n            md = result.document.export_to_markdown()\n            \n            out_file = output_path \u002F f\"{doc_path.stem}.md\"\n            with open(out_file, 'w') as f:\n                f.write(md)\n            \n            return {'file': str(doc_path), 'status': 'success'}\n        except Exception as e:\n            return {'file': str(doc_path), 'status': 'error', 'error': str(e)}\n    \n    docs = list(input_path.glob('*.pdf')) + list(input_path.glob('*.docx'))\n    \n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        results = list(executor.map(process_single, docs))\n    \n    return results\n```\n\n## Best Practices\n\n1. **Use Appropriate Pipeline**: Configure for your document type\n2. **Handle Large Documents**: Process in chunks if needed\n3. **Verify Table Extraction**: Complex tables may need review\n4. **Check OCR Quality**: Enable OCR for scanned documents\n5. **Cache Results**: Store parsed documents for reuse\n\n## Common Patterns\n\n### Academic Paper Parser\n```python\ndef parse_academic_paper(pdf_path):\n    \"\"\"Parse academic paper structure.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    paper = {\n        'title': None,\n        'abstract': None,\n        'sections': [],\n        'references': [],\n        'tables': [],\n        'figures': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        text = element.text if hasattr(element, 'text') else ''\n        \n        if element.type == 'title':\n            paper['title'] = text\n        \n        elif element.type == 'heading':\n            if 'abstract' in text.lower():\n                current_section = 'abstract'\n            elif 'reference' in text.lower():\n                current_section = 'references'\n            else:\n                paper['sections'].append({\n                    'title': text,\n                    'content': ''\n                })\n                current_section = 'section'\n        \n        elif element.type == 'paragraph':\n            if current_section == 'abstract':\n                paper['abstract'] = text\n            elif current_section == 'section' and paper['sections']:\n                paper['sections'][-1]['content'] += text + '\\n'\n        \n        elif element.type == 'table':\n            paper['tables'].append({\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'data': element.export_to_dataframe() if hasattr(element, 'export_to_dataframe') else None\n            })\n    \n    return paper\n```\n\n### Report to Structured Data\n```python\ndef parse_business_report(doc_path):\n    \"\"\"Parse business report into structured format.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    report = {\n        'metadata': {\n            'title': None,\n            'date': None,\n            'author': None\n        },\n        'executive_summary': None,\n        'sections': [],\n        'key_metrics': [],\n        'recommendations': []\n    }\n    \n    # Parse document structure\n    for element in doc.iterate_items():\n        # Implement parsing logic based on document structure\n        pass\n    \n    return report\n```\n\n## Examples\n\n### Example 1: Parse Financial Report\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_financial_report(pdf_path):\n    \"\"\"Extract structured data from financial report.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    financial_data = {\n        'income_statement': None,\n        'balance_sheet': None,\n        'cash_flow': None,\n        'notes': []\n    }\n    \n    # Extract tables\n    tables = []\n    for element in doc.iterate_items():\n        if element.type == 'table':\n            table_df = element.export_to_dataframe()\n            \n            # Identify table type\n            if 'revenue' in str(table_df).lower() or 'income' in str(table_df).lower():\n                financial_data['income_statement'] = table_df\n            elif 'asset' in str(table_df).lower() or 'liabilities' in str(table_df).lower():\n                financial_data['balance_sheet'] = table_df\n            elif 'cash' in str(table_df).lower():\n                financial_data['cash_flow'] = table_df\n            else:\n                tables.append(table_df)\n    \n    # Extract markdown for notes\n    financial_data['markdown'] = doc.export_to_markdown()\n    \n    return financial_data\n\nreport = parse_financial_report('annual_report.pdf')\nprint(\"Income Statement:\")\nprint(report['income_statement'])\n```\n\n### Example 2: Technical Documentation Parser\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_technical_docs(doc_path):\n    \"\"\"Parse technical documentation.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    documentation = {\n        'title': None,\n        'version': None,\n        'sections': [],\n        'code_blocks': [],\n        'diagrams': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        if element.type == 'title':\n            documentation['title'] = element.text\n        \n        elif element.type == 'heading':\n            current_section = {\n                'title': element.text,\n                'level': element.level if hasattr(element, 'level') else 1,\n                'content': []\n            }\n            documentation['sections'].append(current_section)\n        \n        elif element.type == 'code':\n            if current_section:\n                current_section['content'].append({\n                    'type': 'code',\n                    'content': element.text\n                })\n            documentation['code_blocks'].append(element.text)\n        \n        elif element.type == 'picture':\n            documentation['diagrams'].append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'caption': element.caption if hasattr(element, 'caption') else None\n            })\n    \n    return documentation\n\ndocs = parse_technical_docs('api_documentation.pdf')\nprint(f\"Title: {docs['title']}\")\nprint(f\"Sections: {len(docs['sections'])}\")\n```\n\n### Example 3: Contract Analysis\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef analyze_contract(pdf_path):\n    \"\"\"Parse contract document for key clauses.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    contract = {\n        'parties': [],\n        'clauses': [],\n        'dates': [],\n        'amounts': [],\n        'full_text': doc.export_to_text()\n    }\n    \n    import re\n    \n    # Extract dates\n    date_pattern = r'\\b\\d{1,2}[\u002F-]\\d{1,2}[\u002F-]\\d{2,4}\\b|\\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]* \\d{1,2},? \\d{4}\\b'\n    contract['dates'] = re.findall(date_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Extract monetary amounts\n    amount_pattern = r'\\$[\\d,]+(?:\\.\\d{2})?|\\b\\d+(?:,\\d{3})*(?:\\.\\d{2})?\\s*(?:USD|dollars)\\b'\n    contract['amounts'] = re.findall(amount_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Parse sections as clauses\n    for element in doc.iterate_items():\n        if element.type == 'heading':\n            contract['clauses'].append({\n                'title': element.text,\n                'content': ''\n            })\n        elif element.type == 'paragraph' and contract['clauses']:\n            contract['clauses'][-1]['content'] += element.text + '\\n'\n    \n    return contract\n\ncontract_data = analyze_contract('agreement.pdf')\nprint(f\"Key dates: {contract_data['dates']}\")\nprint(f\"Amounts: {contract_data['amounts']}\")\n```\n\n## Limitations\n\n- Very large documents may require chunking\n- Handwritten content needs OCR preprocessing\n- Complex nested tables may need manual review\n- Some PDF types (encrypted) not supported\n- GPU recommended for best performance\n\n## Installation\n\n```bash\npip install docling\n\n# For full functionality\npip install docling[all]\n\n# For OCR support\npip install docling[ocr]\n```\n\n## Resources\n\n- [docling GitHub](https:\u002F\u002Fgithub.com\u002FDS4SD\u002Fdocling)\n- [Documentation](https:\u002F\u002Fds4sd.github.io\u002Fdocling\u002F)\n- [IBM Research Blog](https:\u002F\u002Fresearch.ibm.com\u002F)\n","# Document Parser Skill\n\n## Overview\n\nThis skill enables advanced document parsing using **docling** - IBM's state-of-the-art document understanding library. Parse complex PDFs, Word documents, and images while preserving structure, extracting tables, figures, and handling multi-column layouts.\n\n## How to Use\n\n1. Provide the document to parse\n2. Specify what you want to extract (text, tables, figures, etc.)\n3. I'll parse it and return structured data\n\n**Example prompts:**\n- \"Parse this PDF and extract all tables\"\n- \"Convert this academic paper to structured markdown\"\n- \"Extract figures and captions from this document\"\n- \"Parse this report preserving the document structure\"\n\n## Domain Knowledge\n\n### docling Fundamentals\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Initialize converter\nconverter = DocumentConverter()\n\n# Convert document\nresult = converter.convert(\"document.pdf\")\n\n# Access parsed content\ndoc = result.document\nprint(doc.export_to_markdown())\n```\n\n### Supported Formats\n\n| Format | Extension | Notes |\n|--------|-----------|-------|\n| PDF | .pdf | Native and scanned |\n| Word | .docx | Full structure preserved |\n| PowerPoint | .pptx | Slides as sections |\n| Images | .png, .jpg | OCR + layout analysis |\n| HTML | .html | Structure preserved |\n\n### Basic Usage\n\n```python\nfrom docling.document_converter import DocumentConverter\n\n# Create converter\nconverter = DocumentConverter()\n\n# Convert single document\nresult = converter.convert(\"report.pdf\")\n\n# Access document\ndoc = result.document\n\n# Export options\nmarkdown = doc.export_to_markdown()\ntext = doc.export_to_text()\njson_doc = doc.export_to_dict()\n```\n\n### Advanced Configuration\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom docling.datamodel.base_models import InputFormat\nfrom docling.datamodel.pipeline_options import PdfPipelineOptions\n\n# Configure pipeline\npipeline_options = PdfPipelineOptions()\npipeline_options.do_ocr = True\npipeline_options.do_table_structure = True\npipeline_options.table_structure_options.do_cell_matching = True\n\n# Create converter with options\nconverter = DocumentConverter(\n    allowed_formats=[InputFormat.PDF, InputFormat.DOCX],\n    pdf_backend_options=pipeline_options\n)\n\nresult = converter.convert(\"document.pdf\")\n```\n\n### Document Structure\n\n```python\n# Document hierarchy\ndoc = result.document\n\n# Access metadata\nprint(doc.name)\nprint(doc.origin)\n\n# Iterate through content\nfor element in doc.iterate_items():\n    print(f\"Type: {element.type}\")\n    print(f\"Text: {element.text}\")\n    \n    if element.type == \"table\":\n        print(f\"Rows: {len(element.data.table_cells)}\")\n```\n\n### Extracting Tables\n\n```python\nfrom docling.document_converter import DocumentConverter\nimport pandas as pd\n\ndef extract_tables(doc_path):\n    \"\"\"Extract all tables from document.\"\"\"\n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    tables = []\n    \n    for element in doc.iterate_items():\n        if element.type == \"table\":\n            # Get table data\n            table_data = element.export_to_dataframe()\n            tables.append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'dataframe': table_data\n            })\n    \n    return tables\n\n# Usage\ntables = extract_tables(\"report.pdf\")\nfor i, table in enumerate(tables):\n    print(f\"Table {i+1} on page {table['page']}:\")\n    print(table['dataframe'])\n```\n\n### Extracting Figures\n\n```python\ndef extract_figures(doc_path, output_dir):\n    \"\"\"Extract figures with captions.\"\"\"\n    import os\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    figures = []\n    os.makedirs(output_dir, exist_ok=True)\n    \n    for element in doc.iterate_items():\n        if element.type == \"picture\":\n            figure_info = {\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'page': element.prov[0].page_no if element.prov else None,\n            }\n            \n            # Save image if available\n            if hasattr(element, 'image'):\n                img_path = os.path.join(output_dir, f\"figure_{len(figures)+1}.png\")\n                element.image.save(img_path)\n                figure_info['path'] = img_path\n            \n            figures.append(figure_info)\n    \n    return figures\n```\n\n### Handling Multi-column Layouts\n\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_multicolumn(doc_path):\n    \"\"\"Parse document with multi-column layout.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    # docling automatically handles column detection\n    # Text is returned in reading order\n    \n    structured_content = []\n    \n    for element in doc.iterate_items():\n        content_item = {\n            'type': element.type,\n            'text': element.text if hasattr(element, 'text') else None,\n            'level': element.level if hasattr(element, 'level') else None,\n        }\n        \n        # Add bounding box if available\n        if element.prov:\n            content_item['bbox'] = element.prov[0].bbox\n            content_item['page'] = element.prov[0].page_no\n        \n        structured_content.append(content_item)\n    \n    return structured_content\n```\n\n### Export Formats\n\n```python\nfrom docling.document_converter import DocumentConverter\n\nconverter = DocumentConverter()\nresult = converter.convert(\"document.pdf\")\ndoc = result.document\n\n# Markdown export\nmarkdown = doc.export_to_markdown()\nwith open(\"output.md\", \"w\") as f:\n    f.write(markdown)\n\n# Plain text\ntext = doc.export_to_text()\n\n# JSON\u002Fdict format\njson_doc = doc.export_to_dict()\n\n# HTML format (if supported)\n# html = doc.export_to_html()\n```\n\n### Batch Processing\n\n```python\nfrom docling.document_converter import DocumentConverter\nfrom pathlib import Path\nfrom concurrent.futures import ThreadPoolExecutor\n\ndef batch_parse(input_dir, output_dir, max_workers=4):\n    \"\"\"Parse multiple documents in parallel.\"\"\"\n    \n    input_path = Path(input_dir)\n    output_path = Path(output_dir)\n    output_path.mkdir(exist_ok=True)\n    \n    converter = DocumentConverter()\n    \n    def process_single(doc_path):\n        try:\n            result = converter.convert(str(doc_path))\n            md = result.document.export_to_markdown()\n            \n            out_file = output_path \u002F f\"{doc_path.stem}.md\"\n            with open(out_file, 'w') as f:\n                f.write(md)\n            \n            return {'file': str(doc_path), 'status': 'success'}\n        except Exception as e:\n            return {'file': str(doc_path), 'status': 'error', 'error': str(e)}\n    \n    docs = list(input_path.glob('*.pdf')) + list(input_path.glob('*.docx'))\n    \n    with ThreadPoolExecutor(max_workers=max_workers) as executor:\n        results = list(executor.map(process_single, docs))\n    \n    return results\n```\n\n## Best Practices\n\n1. **Use Appropriate Pipeline**: Configure for your document type\n2. **Handle Large Documents**: Process in chunks if needed\n3. **Verify Table Extraction**: Complex tables may need review\n4. **Check OCR Quality**: Enable OCR for scanned documents\n5. **Cache Results**: Store parsed documents for reuse\n\n## Common Patterns\n\n### Academic Paper Parser\n```python\ndef parse_academic_paper(pdf_path):\n    \"\"\"Parse academic paper structure.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    paper = {\n        'title': None,\n        'abstract': None,\n        'sections': [],\n        'references': [],\n        'tables': [],\n        'figures': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        text = element.text if hasattr(element, 'text') else ''\n        \n        if element.type == 'title':\n            paper['title'] = text\n        \n        elif element.type == 'heading':\n            if 'abstract' in text.lower():\n                current_section = 'abstract'\n            elif 'reference' in text.lower():\n                current_section = 'references'\n            else:\n                paper['sections'].append({\n                    'title': text,\n                    'content': ''\n                })\n                current_section = 'section'\n        \n        elif element.type == 'paragraph':\n            if current_section == 'abstract':\n                paper['abstract'] = text\n            elif current_section == 'section' and paper['sections']:\n                paper['sections'][-1]['content'] += text + '\\n'\n        \n        elif element.type == 'table':\n            paper['tables'].append({\n                'caption': element.caption if hasattr(element, 'caption') else None,\n                'data': element.export_to_dataframe() if hasattr(element, 'export_to_dataframe') else None\n            })\n    \n    return paper\n```\n\n### Report to Structured Data\n```python\ndef parse_business_report(doc_path):\n    \"\"\"Parse business report into structured format.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    report = {\n        'metadata': {\n            'title': None,\n            'date': None,\n            'author': None\n        },\n        'executive_summary': None,\n        'sections': [],\n        'key_metrics': [],\n        'recommendations': []\n    }\n    \n    # Parse document structure\n    for element in doc.iterate_items():\n        # Implement parsing logic based on document structure\n        pass\n    \n    return report\n```\n\n## Examples\n\n### Example 1: Parse Financial Report\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_financial_report(pdf_path):\n    \"\"\"Extract structured data from financial report.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    financial_data = {\n        'income_statement': None,\n        'balance_sheet': None,\n        'cash_flow': None,\n        'notes': []\n    }\n    \n    # Extract tables\n    tables = []\n    for element in doc.iterate_items():\n        if element.type == 'table':\n            table_df = element.export_to_dataframe()\n            \n            # Identify table type\n            if 'revenue' in str(table_df).lower() or 'income' in str(table_df).lower():\n                financial_data['income_statement'] = table_df\n            elif 'asset' in str(table_df).lower() or 'liabilities' in str(table_df).lower():\n                financial_data['balance_sheet'] = table_df\n            elif 'cash' in str(table_df).lower():\n                financial_data['cash_flow'] = table_df\n            else:\n                tables.append(table_df)\n    \n    # Extract markdown for notes\n    financial_data['markdown'] = doc.export_to_markdown()\n    \n    return financial_data\n\nreport = parse_financial_report('annual_report.pdf')\nprint(\"Income Statement:\")\nprint(report['income_statement'])\n```\n\n### Example 2: Technical Documentation Parser\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef parse_technical_docs(doc_path):\n    \"\"\"Parse technical documentation.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(doc_path)\n    doc = result.document\n    \n    documentation = {\n        'title': None,\n        'version': None,\n        'sections': [],\n        'code_blocks': [],\n        'diagrams': []\n    }\n    \n    current_section = None\n    \n    for element in doc.iterate_items():\n        if element.type == 'title':\n            documentation['title'] = element.text\n        \n        elif element.type == 'heading':\n            current_section = {\n                'title': element.text,\n                'level': element.level if hasattr(element, 'level') else 1,\n                'content': []\n            }\n            documentation['sections'].append(current_section)\n        \n        elif element.type == 'code':\n            if current_section:\n                current_section['content'].append({\n                    'type': 'code',\n                    'content': element.text\n                })\n            documentation['code_blocks'].append(element.text)\n        \n        elif element.type == 'picture':\n            documentation['diagrams'].append({\n                'page': element.prov[0].page_no if element.prov else None,\n                'caption': element.caption if hasattr(element, 'caption') else None\n            })\n    \n    return documentation\n\ndocs = parse_technical_docs('api_documentation.pdf')\nprint(f\"Title: {docs['title']}\")\nprint(f\"Sections: {len(docs['sections'])}\")\n```\n\n### Example 3: Contract Analysis\n```python\nfrom docling.document_converter import DocumentConverter\n\ndef analyze_contract(pdf_path):\n    \"\"\"Parse contract document for key clauses.\"\"\"\n    \n    converter = DocumentConverter()\n    result = converter.convert(pdf_path)\n    doc = result.document\n    \n    contract = {\n        'parties': [],\n        'clauses': [],\n        'dates': [],\n        'amounts': [],\n        'full_text': doc.export_to_text()\n    }\n    \n    import re\n    \n    # Extract dates\n    date_pattern = r'\\b\\d{1,2}[\u002F-]\\d{1,2}[\u002F-]\\d{2,4}\\b|\\b(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]* \\d{1,2},? \\d{4}\\b'\n    contract['dates'] = re.findall(date_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Extract monetary amounts\n    amount_pattern = r'\\$[\\d,]+(?:\\.\\d{2})?|\\b\\d+(?:,\\d{3})*(?:\\.\\d{2})?\\s*(?:USD|dollars)\\b'\n    contract['amounts'] = re.findall(amount_pattern, contract['full_text'], re.IGNORECASE)\n    \n    # Parse sections as clauses\n    for element in doc.iterate_items():\n        if element.type == 'heading':\n            contract['clauses'].append({\n                'title': element.text,\n                'content': ''\n            })\n        elif element.type == 'paragraph' and contract['clauses']:\n            contract['clauses'][-1]['content'] += element.text + '\\n'\n    \n    return contract\n\ncontract_data = analyze_contract('agreement.pdf')\nprint(f\"Key dates: {contract_data['dates']}\")\nprint(f\"Amounts: {contract_data['amounts']}\")\n```\n\n## Limitations\n\n- Very large documents may require chunking\n- Handwritten content needs OCR preprocessing\n- Complex nested tables may need manual review\n- Some PDF types (encrypted) not supported\n- GPU recommended for best performance\n\n## Installation\n\n```bash\npip install docling\n\n# For full functionality\npip install docling[all]\n\n# For OCR support\npip install docling[ocr]\n```\n\n## Resources\n\n- [docling GitHub](https:\u002F\u002Fgithub.com\u002FDS4SD\u002Fdocling)\n- [Documentation](https:\u002F\u002Fds4sd.github.io\u002Fdocling\u002F)\n- [IBM Research Blog](https:\u002F\u002Fresearch.ibm.com\u002F)\n",{"name":5,"tags":43,"tools":45,"author":48,"models":49,"library":52,"version":55,"description":7},[23,44,34,22,29],"docling",[31,46,47],"code_execution","file_operations","claude-office-skills",[50,51],"claude-sonnet-4","claude-opus-4",{"url":53,"name":44,"stars":54},"https:\u002F\u002Fgithub.com\u002FDS4SD\u002Fdocling","51.5k","1.0","main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","PDF及文件\u002Fdoc-parser",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":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill doc-parser",{"tool":70,"command":71},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill doc-parser",{"tool":73,"command":74},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill doc-parser","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002FPDF及文件\u002Fdoc-parser\u002FSKILL.md",true,[78],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"_meta.json","REFERENCE","参考文档",280,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002FPDF及文件\u002Fdoc-parser\u002F_meta.json",[85,109,132,140,147,174],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":38},"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",[],[87,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],"safe","ethereum","defi","Optimization","user","use","Wallet","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":110,"name":111,"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":112,"categories":113,"keywords":114,"publishedAt":38},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[],[115,116,117,118,119,120,121,94,122,98,123,124,125,126,127,128,129,130,131],"api","zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":133,"name":134,"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":135,"categories":136,"keywords":137,"publishedAt":38},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[],[115,138,139,116,117,118,119,120,121,94,122,98,124,125,126,127,128,129,130,131],"api skill","zerion api skill",{"skillNo":141,"name":142,"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":143,"categories":144,"keywords":145,"publishedAt":38},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[],[118,115,146,116,117,119,120,94,122,98,123,124,125,126,127,128,129,130,131],"zerion api mcp",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":38},"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",[],[154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","https","sentiment","real-time","python3","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":38},"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",[],[154,155,157,181,182,183,184,185,186,165,187,188,189,190,191,192,193,194,131,172],"cli","homebrew","find","check","brew","up","local","get","stock","link","trending","sf","quotes","ln"]