شعار Scientific Data Extraction

Scientific Data Extraction

المجتمع
jkitchin
scientific-data-extraction

Extract structured data from scientific literature across multiple formats (PDF, HTML, images, plain text). Auto-detects scientific domain to recommend specialized tools for chemistry/materials when appropriate. Use this skill when: extracting numerical data from papers, digitizing graphs/plots, parsing tables from PDFs, extracting chemical properties or reactions, or converting unstructured scientific text to structured formats. Key capabilities: format detection and routing, domain-specific extraction (chemistry/materials), multi-method validation, table extraction, graph digitization, LLM-enhanced extraction with verification, confidence scoring.

نظرة عامة

الناشرjkitchin
المستودعknowhow
اسم المهارةscientific-data-extraction
النجوم
45
التفريعات
9
الملفات المرفقة
10
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 10

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها jkitchin على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Scientific Data Extraction في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/jkitchin/knowhow/tree/main/skills/research/scientific-data-extraction
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jkitchin/knowhow.git /tmp/knowhow
mkdir -p .claude/skills
cp -r /tmp/knowhow/skills/research/scientific-data-extraction .claude/skills/scientific-data-extraction
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Scientific Data Extraction في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Scientific Data Extraction تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Scientific Data Extraction بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Scientific Data Extraction Skill

Overview

This skill provides comprehensive guidance for extracting structured data from scientific literature across multiple input formats (PDF, HTML, images, plain text). It auto-detects the scientific domain to recommend specialized tools when appropriate (particularly for chemistry and materials science) and employs a hierarchical extraction approach with multi-method validation for high-confidence results.

When to Use This Skill

Use this skill when you need to:

  • Extract numerical data from scientific papers, reports, or documents
  • Digitize graphs and plots to recover underlying data points
  • Parse tables from PDFs or images into structured formats (CSV, DataFrame, JSON)
  • Extract chemical/materials data including properties, reactions, compounds, and structures
  • Convert unstructured text to structured JSON or tabular formats
  • Validate extracted data through multi-method cross-checking
  • Process document batches with consistent extraction methodology

Input Format Detection

The first step is identifying the input format and routing to appropriate tools:

Plain Text (.txt, .md)

  • Domain detection via keyword analysis
  • NLP-based entity extraction (spaCy, Stanza)
  • Regex patterns for structured data (numbers with units, chemical formulas)
  • LLM-based structured extraction

HTML (.html, web pages)

  • HTML parsing with BeautifulSoup + lxml
  • Table detection and extraction
  • Text content extraction with structure preservation
  • Domain-specific processing after text extraction

PDF (.pdf)

PriorityToolSpeedUse Case
QuickPyMuPDF4LLM~0.12sInitial exploration, large batches
StandardGROBIDMediumResearch-grade, reference parsing
StandardDoclingMediumLayout-aware, complex documents
TablesCamelotFastBordered tables
TablesTabulaFastGeneral tables
TablespdfplumberMediumComplex table structures
DeepMarker-PDFSlowerScanned documents with OCR

Images (.png, .jpg, .tiff)

Content TypeRecommended Approach
Document scanOCR (Tesseract/Surya) then text pipeline
Graph/PlotWebPlotDigitizer workflow or LLM vision
Table imageTable Transformer or LLM vision
Chemical structureOSRA or DECIMER for SMILES conversion

Domain Detection

The skill automatically detects scientific domain to apply specialized tools:

Chemistry/Materials Indicators

  • Chemical formulas (H2O, NaCl, TiO2)
  • SMILES strings, InChI identifiers
  • Reaction arrows (→, ⟶, ⇌)
  • Property keywords: melting point, bandgap, conductivity, yield, purity
  • Material names and IUPAC nomenclature
  • Spectroscopic data patterns (NMR shifts, IR peaks)

When Chemistry/Materials Detected

Apply specialized tools:

  • ChemDataExtractor v2: Property extraction, entity recognition, table parsing
  • OpenChemIE: Reaction extraction from text, tables, and figures
  • Domain-specific NER: Chemical named entity recognition

General Scientific Domain

Use general-purpose extraction:

  • Standard NLP pipelines
  • LLM-based structured extraction
  • Template-based parsing

Extraction Method Hierarchy

Apply methods in order of increasing complexity based on requirements:

Level 1: Quick Extraction (Speed Priority)

When to use: Initial exploration, large document batches, simple structured data

python
# Quick PDF to text with PyMuPDF4LLM
import pymupdf4llm
text = pymupdf4llm.to_markdown("paper.pdf")

# Quick HTML parsing
from bs4 import BeautifulSoup
soup = BeautifulSoup(html_content, 'lxml')
tables = soup.find_all('table')

Expected confidence: Lower, suitable for screening

Level 2: Standard Extraction (Balanced)

When to use: Research-grade extraction, structure preservation needed

python
# GROBID for structured PDF parsing
import scipdf_parser
article = scipdf_parser.parse_pdf_to_dict("paper.pdf")

# Docling for layout-aware extraction
from docling.document_converter import DocumentConverter
converter = DocumentConverter()
result = converter.convert("paper.pdf")

# Camelot for bordered tables
import camelot
tables = camelot.read_pdf("paper.pdf", flavor='lattice')
df = tables[0].df

Expected confidence: Medium-high

Level 3: Deep Extraction (Accuracy Priority)

When to use: Publication-quality data, domain-specific extraction

python
# ChemDataExtractor for chemistry documents
from chemdataextractor import Document
doc = Document.from_file("paper.pdf")
records = doc.records

# OpenChemIE for reaction extraction
from openchemie import OpenChemIE
model = OpenChemIE()
reactions = model.extract_reactions_from_text(text)

# Marker-PDF with OCR for scanned documents
from marker.converters.pdf import PdfConverter
converter = PdfConverter()
result = converter("scanned_paper.pdf")

Expected confidence: High

Level 4: LLM-Enhanced Extraction

When to use: Complex figures, ambiguous data, validation needed

python
# LLM-based structured extraction
prompt = """
Extract all numerical data from this text as JSON:
- Property name
- Value (number only)
- Unit
- Context (what material/compound)

Text: {text}
"""

# LLM vision for graph interpretation
prompt = """
Analyze this graph image and extract:
1. X-axis label and range
2. Y-axis label and range
3. All data points as (x, y) pairs
4. Any error bars or uncertainty indicators
"""

Expected confidence: Highest when combined with validation

Multi-Method Validation Pipeline

For high-confidence results, use multiple extraction methods and validate:

Step 1: Primary Extraction

Select method based on input type and domain, extract structured data.

Step 2: Secondary Extraction

Run alternative method on same source, compare results and flag discrepancies.

Step 3: LLM Verification Queries

Ask targeted questions to verify extracted data:

  • "Is this value X consistent with the context Y?"
  • "Does unit Z make sense for property P?"
  • "Are there any missing data points in the expected range?"

Step 4: Confidence Scoring

python
confidence = {
    "score": 0.0,  # 0-1 scale
    "level": "HIGH|MEDIUM|LOW|REVIEW",
    "methods_agreed": [],  # List of methods that produced same result
    "discrepancies": [],   # Any disagreements between methods
    "verification_notes": ""  # LLM verification outcome
}

# Scoring rules:
# - Single method: max 0.7
# - Two methods agree: 0.8
# - Two methods + LLM verification: 0.9
# - Multiple methods + LLM + database cross-reference: 0.95+

Step 5: Database Cross-Reference (Optional)

For chemistry/materials, compare against known databases:

  • Materials Project
  • AFLOW
  • PubChem
  • NIST databases

Flag significant deviations from expected ranges.

Output Format

Structure extracted data consistently:

json
{
  "extraction_metadata": {
    "source": "path/to/document.pdf",
    "source_type": "pdf",
    "domain_detected": "chemistry",
    "methods_used": ["grobid", "chemdataextractor", "llm_verification"],
    "timestamp": "2025-01-18T..."
  },
  "extracted_data": [
    {
      "data_type": "material_property",
      "entity": "TiO2",
      "property": "bandgap",
      "value": 3.2,
      "unit": "eV",
      "source_location": {
        "page": 4,
        "section": "Results",
        "table_id": "Table 2",
        "row": 3
      },
      "confidence": {
        "score": 0.95,
        "level": "HIGH",
        "methods_agreed": ["chemdataextractor", "llm_extraction"],
        "verification_notes": "Value consistent with literature range 3.0-3.4 eV"
      }
    }
  ],
  "validation_summary": {
    "total_extracted": 47,
    "high_confidence": 38,
    "medium_confidence": 7,
    "needs_review": 2,
    "discrepancies": []
  }
}

Step-by-Step Instructions

For PDF Data Extraction

  1. Identify document type: Scanned or text-based PDF
  2. Choose extraction level: Based on accuracy requirements
  3. Detect domain: Check for chemistry/materials indicators
  4. Extract text/structure: Use appropriate tool from hierarchy
  5. Extract tables separately: Use Camelot, Tabula, or pdfplumber
  6. Apply domain tools: If chemistry detected, use ChemDataExtractor
  7. Validate: Run secondary extraction or LLM verification
  8. Format output: Structure as JSON with confidence scores

For Graph/Plot Digitization

  1. Assess graph quality: Resolution, clarity, labeling
  2. Identify graph type: Line plot, scatter, bar chart, contour
  3. Choose method:
    • Simple, clear graphs: WebPlotDigitizer (manual calibration)
    • Complex or batch: LLM vision extraction
  4. Calibrate axes: Define coordinate system
  5. Extract data points: Manual selection or automatic detection
  6. Validate: Check extracted points against visual inspection
  7. Export: CSV or JSON format with uncertainty estimates

For Table Extraction

  1. Identify table type: Bordered (lattice) or borderless (stream)
  2. Choose tool:
    • Bordered: Camelot with flavor='lattice'
    • Borderless: Tabula or Camelot with flavor='stream'
    • Complex: pdfplumber for fine-grained control
  3. Extract to DataFrame: Review structure and headers
  4. Clean data: Fix merged cells, missing values, formatting
  5. Apply domain parsing: Convert units, parse chemical formulas
  6. Validate: Compare against source visually
  7. Export: CSV, JSON, or integrate into dataset

For Chemistry/Materials Extraction

  1. Confirm domain: Verify chemistry/materials content
  2. Choose specialized tool:
    • Properties: ChemDataExtractor v2
    • Reactions: OpenChemIE
    • Structures from images: OSRA or DECIMER
  3. Configure extraction: Set up parsers for target properties
  4. Run extraction: Process document with domain tools
  5. Post-process: Normalize units, standardize identifiers
  6. Cross-reference: Compare against databases (Materials Project, PubChem)
  7. Validate: LLM verification of unusual values
  8. Export: Structured JSON with confidence scores

Best Practices

  1. Always start with format detection - Correct tool selection depends on accurate format identification

  2. Use the simplest method that works - Start at Level 1 and escalate only if needed

  3. Preserve source location - Track page numbers, sections, table IDs for traceability

  4. Validate unusual values - Any value outside expected ranges should be flagged and verified

  5. Document extraction methodology - Record which tools and settings produced each data point

  6. Handle uncertainty explicitly - Include error bounds when available, note when values are approximate

  7. Cross-reference chemistry data - Always compare against known databases for sanity checking

  8. Use LLM verification judiciously - Most valuable for complex figures and ambiguous cases

Requirements

Core Python Packages

  • pymupdf4llm: Quick PDF extraction
  • pdfplumber: Detailed PDF analysis
  • camelot-py: Table extraction (requires ghostscript)
  • beautifulsoup4, lxml: HTML parsing
  • spacy: NLP processing
  • pandas: Data manipulation

Domain-Specific (Chemistry)

  • chemdataextractor: Chemistry NLP (v2 recommended)
  • openchemie: Reaction extraction

Optional

  • tabula-py: Table extraction (requires Java)
  • grobid (server): Academic PDF parsing
  • docling: IBM document converter
  • marker-pdf: OCR-capable PDF conversion
  • tesseract or surya: OCR engines

Limitations

  1. Scanned documents require OCR - Quality depends on scan resolution and OCR accuracy

  2. Complex table structures - Merged cells, nested headers may require manual correction

  3. Graph digitization is approximate - Precision limited by image resolution and calibration

  4. Domain tools are specialized - Chemistry tools won't work well on biology or physics texts

  5. LLM extraction can hallucinate - Always validate with source or alternative method

  6. Some PDFs are protected - May not be extractable due to DRM or image-only content

Related Skills

  • literature-review: For systematic literature searching and synthesis
  • scientific-reviewer: For evaluating extracted data quality
  • materials-databases: For cross-referencing extracted chemistry/materials data
  • python-plotting: For visualizing extracted data

References

See the references/ directory for detailed documentation on:

  • pdf-tools.md: Comprehensive PDF extraction tool comparison
  • table-extraction.md: Table extraction methods and code examples
  • graph-digitization.md: Graph data extraction techniques
  • chemistry-tools.md: ChemDataExtractor and OpenChemIE usage
  • llm-extraction.md: LLM-based extraction patterns and validation

See the examples/ directory for complete workflows:

  • extract-from-pdf.md: End-to-end PDF extraction example
  • extract-table-data.md: Table extraction comparison
  • digitize-graph.md: Graph digitization guide
  • chemistry-extraction.md: Chemistry-specific extraction workflow

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Scientific Data Extraction؟

Extract structured data from scientific literature across multiple formats (PDF, HTML, images, plain text). Auto-detects scientific domain to recommend specialized tools for chemistry/materials when appropriate. Use this skill when: extracting numerical data from papers, digitizing graphs/plots, parsing tables from PDFs, extracting chemical properties or reactions, or converting unstructured scientific text to structured formats. Key capabilities: format detection and routing, domain-specific extraction (chemistry/materials), multi-method validation, table extraction, graph digitization, LL...

لماذا تستخدم Scientific Data Extraction على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Scientific Data Extraction عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Scientific Data Extraction في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/jkitchin/knowhow/tree/main/skills/research/scientific-data-extraction. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Scientific Data Extraction؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Scientific Data Extraction؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Scientific Data Extraction معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Scientific Data Extraction مجانية؟

نعم. نشرها jkitchin على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇