ogogo/tika
Composer 安装命令:
composer require ogogo/tika
包简介
A wrapper for Tika in ZF2
README 文档
README
This is a ZF2 Wrapper for Apache Tika.
It allows you to retrieve text, metadata and language from complex documents.
Supported formats
It supports opendocument, office .doc and .docx, pdf, images, videos and a lot more !
See http://tika.apache.org/1.7/formats.html for details.
Install with composer
Add the package dependency ogogo/tika in your composer.json
{
"require": {
"ogogo/tika": "dev-master"
}
}
Install with composer
php composer.phar install
Usage
In your own project, assuming you have an opendocument test.odt in the current directory
<?php
use Ogogo\Lib\Tika\TikaApp;
$testFile = new \SplFileInfo(__DIR__."/yourdocument.pdf");
$tikaApp = new TikaApp();
$plaintext = $tikaApp->getText($testFile);
$metadataArray = $tikaApp->getMetaData($testFile);
$language = $tikaApp->getLanguage($testFile);
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-01-31