AT

apache/tika

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4145 stars 质量 66 趋势 25Apache-2.0

Apache Tika 工具包能够检测并提取超过一千种不同文件类型(如 PPT、XLS 和 PDF)的元数据和文本。

概览

Apache Tika(TM)能够检测并提取超过一千种文件类型的元数据和文本。自4.0.0起,它输出的输出——为LLM和RAG流水线做形状——解析,并添加了视觉语言模型解析器(Claude、Gemini、OpenAI),用于OCR无法读取的文档。 Tika 是 Apache 软件基金会的一个项目。 Apache Tika、Tika、Apache、Apache 羽毛标志和 Apache Tika 项目标志是 Apache 软件基金会的商标。 Tika 4.x 是为代理流水线设计的:默认使用 Markdown 输出,结构化递归提取(-J / /rmeta),以及进程隔离,使敌对文档下架分支,而不是你的服务。 现成可用的代理技能存在于 .skills/:file-to-markdown(通过 tika-app 或 tika-server 解析)和 file-to-markdown-docker(容器化的 Tika 格式,保证 OCR)。它们是独立的——可以复制到任何代理的技能目录;里面没有任何内容需要这个仓库。 — 拉链 tika-app- 。

概述(AI 翻译)

Apache Tika(TM)能够从一千多个元数据和文本中检测并提取 文件类型。从4.0.0开始,默认输出Markdown——输出形状为 LLM和RAG流水线——崩溃隔离的分叉进程中的解析,以及 增加了用于文档OCR的视觉语言模型解析器(Claude、Gemini、OpenAI) 看不懂字。

Tika 是 Apache 软件基金会的一个项目。

Apache Tika、Tika、Apache、Apache 羽毛标志和 Apache Tika 项目标志是 Apache 软件基金会的商标。

利用AI代理的Tika

Tika 4.x 是为代理管道设计的:默认是 Markdown 输出,结构化 递归提取(-J / /rmeta),以及过程隔离,因此是敌对的 文档是删除分支,而不是你的服务。

现成型特工技能现存于.skills/: file-to-markdown(通过tika-app解析 或称tika服务器)和 file-to-markdown-docker (带保证OCR的容器化Tika)。它们是独立的——复制到 任何代理的技能目录;里面没有任何东西需要这个仓库。

快速启动

解析Java文件:

从命令行 — 将tika-app- .zip解压到目录(zip

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Welcome to Apache Tika

Apache Tika™ detects and extracts metadata and text from over a thousand file types. As of 4.0.0 it emits Markdown by default — output shaped for LLM and RAG pipelines — parses in crash-isolated forked processes, and adds vision-language-model parsers (Claude, Gemini, OpenAI) for documents OCR can’t read.

Tika is a project of the Apache Software Foundation.

Apache Tika, Tika, Apache, the Apache feather logo, and the Apache Tika project logo are trademarks of The Apache Software Foundation.

Using Tika from AI Agents

Tika 4.x is built for agent pipelines: Markdown output by default, structured recursive extraction (-J / /rmeta), and process isolation so a hostile document takes down a fork, not your service.

Ready-to-use agent skills live in .skills/: file-to-markdown (parsing via tika-app or tika-server) and file-to-markdown-docker (containerized Tika with guaranteed OCR). They are standalone — copy them into any agent’s skill directory; nothing in them requires this repository.

Quick Start

Parse a file in Java:

import org.apache.tika.Tika;

Tika tika = new Tika();
String text = tika.parseToString(new File("document.pdf"));
System.out.println(text);

From the command line — unzip tika-app-.zip into a directory (the zip has no top-level directory of its own) and run from inside it. The jar is a thin launcher that loads the parsers from the adjacent lib/; on its own it fails with NoClassDefFoundError.

java -jar tika-app-.jar document.pdf        # Markdown (the 4.x default)
java -jar tika-app-.jar --text document.pdf # plain text
java -jar tika-app-.jar -J document.pdf     # structured JSON: metadata +
                                                     # content for the document AND
                                                     # anything embedded in it

Maven dependency:


    org.apache.tika
    tika-parsers-standard-package
    4.x.y
    pom

Getting Started

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add apache/tika
新手?先看 mcpskill.org 教程 →