hirmeos/entity-fishing-php-wrapper
Composer 安装命令:
composer require hirmeos/entity-fishing-php-wrapper
包简介
This is a PHP library/wrapper of the NERD API. High level method calls that parse the JSON API response to PHP classes for ease of use.
README 文档
README
This is a PHP library/wrapper of the NERD API. High level method calls that parse the JSON API response to PHP classes for ease of use.
Installation
Method 1
Just copy the following files in your project:
- Folder: Domain
- Folder: WebResponse
- File: EFWebServiceManager.php
Method 2
Method 2 relies on Packagist (https://packagist.org/)
{
"require": {
"hirmeos/entity-fishing-php-wrapper" : "*"
}
}
See the composer documentation here: https://packagist.org/ and here: https://getcomposer.org/doc/01-basic-usage.md#package-versions
Usage
Include: EFWebServiceManager.php in your file
require_once('EFWebServiceManager.php');
Disambiguate Text
EFWebServiceManager::disambiguateText(String searchText, String lang);
Returns object of type: EFDisambiguateTextWebResponse
Disambiguate Short Text
EFWebServiceManager::disambiguateShortText(String searchText, String lang);
Returns object of type: EFDisambiguateShortTextWebResponse
Disambiguate Term Vector
EFWebServiceManager::disambiguateTermVector(Array searchText, String lang);
Returns object of type: EFDisambiguateTermWebResponse
Disambiguate PDF
EFWebServiceManager::disambiguatePDF(String pdf_file_path, String lang);
Returns object of type: EFDisambiguatePDFWebResponse
Concept
EFWebServiceManager::concept(int concept_id, String lang);
Returns object of type: EFConceptWebResponse
Term
EFWebServiceManager::term(int term_id, String lang);
Returns object of type: EFTermWebResponse
Language
EFWebServiceManager::language(String text);
Returns object of type: EFLanguageWebResponse
Segmentation
EFWebServiceManager::segmentation(String text);
Returns object of type: EFSegmentationWebResponse
Responses
All response objects have the following three public variables:
public $has_error;
public $status_code;
public $error_msg;
Use the variables to check for API request errors before proceeding to the actual response data.
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: CC0-1.0
- 更新时间: 2018-09-27