Giter Club home page Giter Club logo

entity-fishing-client-php's Introduction

PHP Client for NERD entity fishing API

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:

  1. Folder: Domain
  2. Folder: WebResponse
  3. 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.

entity-fishing-client-php's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.