AI Skill Hub 推荐使用:ChronoMiner 是一款优质的AI工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
ChronoMiner是一个开源AI工具,使用多个LLM从文本文件中提取结构化数据。它可以帮助用户快速和准确地提取信息,提高工作效率。
ChronoMiner 是一款基于 Python 开发的开源工具,专注于 Python、installable 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
ChronoMiner是一个开源AI工具,使用多个LLM从文本文件中提取结构化数据。它可以帮助用户快速和准确地提取信息,提高工作效率。
ChronoMiner 是一款基于 Python 开发的开源工具,专注于 Python、installable 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install chronominer
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install chronominer
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/Paullllllllllllllllll/ChronoMiner
cd ChronoMiner
pip install -e .
# 验证安装
python -c "import chronominer; print('安装成功')"
# 命令行使用
chronominer --help
# 基本用法
chronominer input_file -o output_file
# Python 代码中调用
import chronominer
# 示例
result = chronominer.process("input")
print(result)
# chronominer 配置文件示例(config.yml) app: name: "chronominer" debug: false log_level: "INFO" # 运行时指定配置文件 chronominer --config config.yml # 或通过环境变量配置 export CHRONOMINER_API_KEY="your-key" export CHRONOMINER_OUTPUT_DIR="./output"
A Python-based structured data extraction tool for researchers, archivists, and digital humanities projects. ChronoMiner transforms text files, scanned images, and PDFs into analyzable datasets (JSON, CSV, DOCX, TXT) using schema-based LLM processing with multiple AI providers.
Designed to integrate with ChronoTranscriber and ChronoDownloader for a complete document retrieval, transcription, and data extraction pipeline.
Work in Progress -- ChronoMiner is under active development. If you encounter any issues, please report them on GitHub.
ChronoMiner enables researchers and archivists to extract structured data from historical and academic documents at scale with minimal cost and effort. It supports multiple AI providers through a unified LangChain-based architecture, schema-driven extraction with 12 built-in templates, and fine-grained control over chunking, concurrency, and output.
Execution modes:
- Interactive -- guided terminal wizard with back/quit navigation. Ideal for first-time users and exploratory workflows. - CLI -- headless automation for scripting and pipelines. Set interactive_mode: false in config/paths_config.yaml or pass arguments directly.
Supported input types:
- Text files -- plain text (.txt, .md) with automatic encoding detection - Image folders -- PNG, JPEG, WEBP, BMP, TIFF sent directly to vision-capable LLMs - PDFs -- rendered page-by-page and processed through vision models - Mixed directories -- auto-detected per file
- Multi-provider LLM support via LangChain (OpenAI, Anthropic, Google, OpenRouter, custom OpenAI-compatible endpoints) - Centralized capability registry -- single source of truth for all provider/model capabilities; unsupported parameters filtered automatically before API calls - Hierarchical context resolution -- file-specific, folder-specific, or project-wide extraction and adjustment context ({name}_extract_context.txt / {name}_adjust_context.txt convention) - Context image injection -- provide a visual reference image alongside text context using the same hierarchical convention ({name}_extract_context.png/jpg/...); the image is sent in the user message before the input content (OpenAI, --context-image) - Schema-based extraction -- 13 built-in JSON schemas with structured LLM output; custom schemas supported - Four chunking strategies -- automatic, automatic with manual adjustment, pre-defined line ranges, LLM-adjusted semantic boundaries - Semantic boundary detection -- LLM-powered chunk optimization with certainty validation and automatic retry - Batch processing -- async batch APIs for OpenAI, Anthropic, and Google with 50% cost savings on OpenAI - Native image/PDF input -- process scans and PDFs directly through vision-capable LLMs without a prior transcription step - Four output formats -- JSON (always), CSV, DOCX, TXT (toggleable per schema) - Daily token budget -- configurable per-day limits with automatic midnight reset - Resume and repair -- skip processed files; repair incomplete batch jobs after the fact
All Python dependencies are declared in pyproject.toml.
uv sync
```bash git clone https://github.com/Paullllllllllllllllll/ChronoMiner.git cd ChronoMiner
ChronoMiner uses five YAML files in config/.
extraction_model:
provider: openai # openai | anthropic | google | openrouter
# | custom (auto-detected if omitted)
name: gpt-5-mini
max_output_tokens: 128000
reasoning:
effort: medium # Cross-provider (low | medium | high)
temperature: 0.01 # Disabled automatically for reasoning
top_p: 1.0 # models
Key parameters: provider (auto-detected from model name if omitted), name (model identifier), max_output_tokens (must cover reasoning tokens on reasoning models), reasoning.effort (automatically translated per provider), temperature/top_p (applied only when the model supports them).
general:
interactive_mode: true
retain_temporary_jsonl: true
logs_dir: './logs'
schemas_paths:
BibliographicEntries:
input: './input/bibliography'
output: './output/bibliography'
csv_output: true
docx_output: true
txt_output: true
Controls execution mode, temporary file retention, and per-schema input/output directories with output format toggles.
chunking:
default_tokens_per_chunk: 7500
Also configures matching rules (whitespace normalization, case sensitivity, diacritics) and retry behavior for the line-range readjuster (certainty threshold, max retries, context expansion).
Provider-specific sections configure vision preprocessing automatically based on the active model:
api_image_processing:
llm_detail: high # OpenAI / OpenRouter
anthropic_image_processing:
resize_profile: auto # Anthropic
google_image_processing:
media_resolution: high # Google Gemini
target_dpi: 300 # PDF-to-image rendering
concurrency:
extraction:
concurrency_limit: 20
delay_between_tasks: 0.1
retry:
attempts: 150
daily_token_limit:
enabled: true
daily_tokens: 9000000
Controls concurrent task limits, exponential backoff retry, and daily token budgets (automatic reset at local midnight).
Connect to any self-hosted or third-party endpoint implementing the OpenAI Chat Completions API. Set provider: custom in model_config.yaml and configure the custom_endpoint block:
extraction_model:
provider: custom
name: "org/model-name"
custom_endpoint:
base_url: "https://your-endpoint.example.com/v1"
api_key_env_var: "CUSTOM_API_KEY"
max_output_tokens: 4096
temperature: 0.0
The endpoint must support OpenAI-compatible structured outputs (response_format with type: json_schema). Custom endpoints do not support batch processing.
--schema NAME Schema name for extraction
--input / --output Input and output paths
--chunking STRATEGY auto | auto-adjust | line_ranges |
adjust-line-ranges
--batch Use async batch API
--image-detail LEVEL low | high | auto | original
--input-type TYPE Override auto-detection: text | image | pdf
--model ID Override model
--reasoning-effort LEVEL none | low | medium | high | xhigh
--chunk-size N Override tokens per chunk
--context MODE_OR_PATH auto | none | /path/to/context.txt
--context-image Enable context image injection (see below)
--first-n-chunks N Process only the first N chunks/pages
--last-n-chunks N Process only the last N chunks/pages
--resume / --force Skip vs overwrite existing output
Run python main/process_text_files.py --help for the full list.
Large-scale batch processing:
```bash
Which AI provider should I choose? OpenAI gpt-5-mini offers the best cost/quality balance with a 50% batch discount. Google Gemini Flash is fastest and cheapest but may reject deeply nested schemas. Anthropic Claude excels with complex layouts. Start with OpenAI gpt-5-mini at medium reasoning effort.
How much does extraction cost? With OpenAI gpt-5-mini: roughly $0.10--0.20 per small file (50 KB), $1--2 per medium file (500 KB). Batch processing halves these costs.
Batch or synchronous? Use batch for large-scale jobs where you can wait up to 24 hours. Use synchronous for immediate results, small jobs, or testing.
Which chunking strategy should I use? Start with automatic for quick runs. For production workflows, generate line ranges, adjust with semantic boundaries, then extract using the adjusted ranges.
How do I add a custom schema? Create a JSON schema in schemas/, register it in modules/extract/schema_handlers.py, add context guidance, and configure paths in paths_config.yaml.
How do I switch providers? Edit config/model_config.yaml and set the appropriate environment variable. Provider can also be auto-detected from the model name.
What happens when extraction fails? Failed chunks are logged. Use repair_extractions.py to recover partial results from batch jobs. For synchronous jobs, re-run with --resume to skip already-processed chunks.
Can I process password-protected PDFs? No. Decrypt them first using external tools.
How do I integrate into existing pipelines? Use CLI mode (interactive_mode: false). All scripts return proper exit codes suitable for shell scripting and CI/CD.
I'm experiencing issues not covered here. Check logs in the configured logs_dir, validate configuration files, and review pyproject.toml for version mismatches. For persistent issues, open a GitHub issue with error details and relevant configuration sections.
ChronoMiner 是一个基于 Python 的结构化数据提取工具,旨在为研究人员、档案馆员和数字人文项目提供快速、低成本的数据提取解决方案。它支持多个 AI 提供商,通过 LangChain 架构实现统一的处理流程,提供 12 个内置模板、精细的控制和输出选项。
ChronoMiner 的关键功能包括多提供商 LLM 支持、中央能力注册表、分层上下文解析等。它支持多个 AI 提供商,包括 OpenAI、Anthropic、Google 等,提供自定义 OpenAI 兼容端点支持。
ChronoMiner 需要 Python 3.12+ 和至少一个 API 密钥。所有 Python 依赖项都声明在 `pyproject.toml` 文件中。
ChronoMiner 的安装步骤包括克隆 Git 仓库、安装依赖项、配置环境变量等。用户可以选择使用 Docker、pip 或源码部署方式。
ChronoMiner 的使用教程包括快速启动、配置文件、命令行参数等。用户可以通过 CLI Reference 来了解更多的使用细节。
ChronoMiner 使用五个 YAML 文件来配置模型、路径、环境变量等。用户需要配置 model_config.yaml、paths_config.yaml 等文件来完成 ChronoMiner 的配置。
ChronoMiner 支持自定义 OpenAI 兼容端点,用户可以通过配置 custom_endpoint 来连接自主端点或第三方端点。
ChronoMiner 的工作流包括大规模批处理、文本提取、图像处理等。用户可以通过 CLI Reference 来了解更多的工作流细节。
FAQ 中回答了用户常见的问题,包括选择 AI 提供商、配置模型等。用户可以通过 FAQ 来了解更多的使用细节。
ChronoMiner是一个有潜力的工具,使用多个LLM提取结构化数据的能力很强大,但需要进一步的优化和测试。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,ChronoMiner 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | ChronoMiner |
| 原始描述 | 开源AI工具:A Python tool for extracting structured data from text files using multiple LLM 。⭐8 · Python |
| Topics | Pythoninstallable |
| GitHub | https://github.com/Paullllllllllllllllll/ChronoMiner |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-20 · 更新时间:2026-05-24 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。