xberg-extracting-tables
ما الذي تفعله
تشرح هذه المهارة كيفية الحصول على الجداول من المستندات باستخدام كشف التخطيط. وهي مناسبة لمن يحتاجون إلى البيانات المالية أو الفواتير أو جداول الأبحاث بشكل قابل للاستخدام.
متى تستخدمها
- ✓عندما تحتاج إلى الجداول من تقرير PDF أو فاتورة أو بيان مالي.
- ✓عندما تريد بيانات الجداول بصيغة markdown واضحة ليقرأها الذكاء الاصطناعي.
- ✓عندما تحتاج إلى قيم خلايا دقيقة في ملف منظم لبرنامج آخر.
رابط المهارة
https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-extracting-tables/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“استخرج كل الجداول من ملف PDF لهذا البيان المالي، في ملف منظم أستطيع فتحه في جدول بيانات.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يفعّل وكيلك كشف التخطيط حتى تحدد الأداة حدود الجداول، ثم يعيد جداول markdown داخل النص أو قائمة منظمة من الخلايا، حسب نوع المخرجات الذي تختاره.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Extracting tables
Use this when the user wants structured tabular data — financial statements, scientific tables, invoices, spreadsheet-style PDFs. Xberg detects tables via a layout model (RT-DETR v2) and reconstructs cell structure with a configurable table model.
Basic usage
# Markdown tables embedded in the content stream
xberg extract report.pdf --layout --content-format markdown
# Structured JSON output, tables appear under result.tables
xberg extract report.pdf --layout --format json
--layout turns on layout-aware extraction; without it, tables fall back
to plain text reflow and you lose cell boundaries.
Output shapes
Two surfaces, picked via --format (CLI shape) and --content-format
(content rendering):
- Markdown tables in
content—--content-format markdown. Tables appear inline as| col | col |blocks. Good for LLM ingestion. - Structured
tablesarray —--format json. Each entry hascells[][](rows × cols),markdown(pre-rendered),page_number,bounding_box. Use this when downstream code needs exact cell access. (bounding_boxis omitted when no position data is available.)
Both are populated at once when --layout is on. The tables array is
always structured; the content stream switches representation.
xberg extract financials.pdf --layout --format json \
| jq '.result.tables[] | {page: .page_number, rows: (.cells | length)}'
Table models
--layout-table-model picks the reconstruction backend:
| Model | Best for | Notes |
|---|---|---|
tatr |
dense complex tables (academic, financial) | Default. Heaviest, highest accuracy. |
slanet_auto |
dispatches per-table to wired/wireless | Good when table styles are mixed. |
slanet_wired |
tables with visible borders | Faster than tatr. |
slanet_wireless |
tables without borders (whitespace-separated) | For invoices, simple grids. |
slanet_plus |
hybrid wired / wireless | Lighter than slanet_auto. |
disabled |
layout detection only, no table structure | Use to skip table model cost. |
xberg extract bank-statement.pdf \
--layout --layout-table-model tatr --content-format markdown
Drop --layout-confidence when the layout model misses tables (default
threshold ~0.5):
xberg extract noisy-scan.pdf --layout --layout-confidence 0.3
Spreadsheets
.xlsx, .ods, .csv, .tsv are extracted by dedicated parsers — no
layout model needed. Each sheet becomes a markdown table (or structured
table) automatically:
xberg extract workbook.xlsx --content-format markdown
xberg extract data.csv --format json
Pass --no-cache=true only when iterating on the same file with different
configs.
Config file alternative
# `output_format` in config files equals `--content-format` on the CLI.
output_format = "markdown"
[layout]
confidence_threshold = 0.5
table_model = "tatr"
Then:
xberg extract report.pdf --format json
Programmatic access
From Python, structured tables live on the document in the result envelope
(result.results[0].tables):
from xberg import ExtractInput, extract, ExtractionConfig, LayoutDetectionConfig
config = ExtractionConfig(
layout=LayoutDetectionConfig(table_model="tatr"),
output_format="markdown",
)
result = await extract(ExtractInput(uri="report.pdf"), config)
for table in result.results[0].tables:
print(table.markdown) # rendered markdown
print(table.cells[0][0]) # cell access
Node.js mirrors this (extract, output.results[0].tables, camelCase fields).
See ../../references/python-api.md and ../../references/nodejs-api.md for full type signatures.
Known limitations
- Merged cells — reconstructed as repeated values across the spanned region; the merge is not preserved as metadata.
- Rotated tables — enable
--ocr-auto-rotate truefor image-based PDFs before extraction. - Nested tables — flattened. Detection succeeds; structural nesting is lost.
- **Multi-page table
الأسئلة الشائعة
لماذا أفعّل إعداد التخطيط؟
بدونه تُعاد صياغة الجداول كنص عادي، وتضيع حدود الخلايا.
أي مخرجات أختار؟
تناسب جداول markdown قراءة الذكاء الاصطناعي، بينما تناسب القائمة المنظمة البرامج التي تحتاج إلى الخلايا بدقة.
هل تُستخرج الجداول بشكل صحيح دائماً؟
لا. تذكر المهارة حدوداً معروفة، لذلك قارن النتيجة بالمستند الأصلي.
التفاصيل
الوصف الأصلي من المؤلف
Use when extracting tabular data from PDFs, spreadsheets, or images. Covers layout-aware table detection, table model selection, output formats (markdown / JSON cells), and known limits.
repo: xberg-io/xberg
الشعبية
- نجوم GitHub
- 9.5k
- الترتيب
- #12271
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
xberg-batch-extraction
9.5kيساعد وكيلك على معالجة مستندات كثيرة دفعة واحدة باستخدام Xberg، بخيارات مشتركة، ودون أن يوقف الملف الفاشل بقية التشغيل.
xberg-chunking
9.5kيساعد وكيلك على تقسيم نصوص المستندات الطويلة إلى أجزاء أصغر لأوامر الذكاء الاصطناعي أو فهارس البحث، بأحجام محددة وتداخل اختياري.
xberg-extracting-keywords
9.5kيساعد وكيلك على استخراج الكلمات المفتاحية أو العبارات المهمة من المستند، وعلى التعرف على لغته، باستخدام إعدادات Xberg للكلمات المفتاحية.
xberg-extracting-with-ocr
9.5kيساعد وكيلك على قراءة النص من ملفات PDF الممسوحة ضوئياً والصور والمستندات التي لا تحتوي على طبقة نص، باستخدام التعرف الضوئي على الحروف OCR.
مهارات مشابهة
feishu-doc
394kيساعد وكيلك على قراءة مستندات Feishu السحابية وإنشائها وتعديلها، بما فيها النصوص والصور والجداول، باستخدام أداة المستندات.
feishu-drive
394kيتيح لوكيلك تصفح الملفات في مجلد سحابي على Feishu شاركته مع البوت، وتنظيمها، والتعليق عليها.
feishu-perm
394kيساعد وكيلك على معرفة من يستطيع الوصول إلى ملف Feishu وتغيير ذلك، مع اختيار أدنى صلاحية تلبي طلبك.