Skip to content

korra88/nerd4php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nerd4php

PHP library to inferface NERD at http://nerd.eurecom.fr

Usage

Include load.php and instantiate \NERD\client with a valid API key:

require_once "/path/to/nerd4php/load.php";

$nerd = new \NERD\client(YOUR_API_KEY);

Create a new document and show info

$idDocument_1 = $nerd->createDocumentFromString("Some random text.");
// Created document @ http://nerd.eurecom.fr/document/$idDocument_1

$document_uri = "http://www.example.com/uri/to/document";
$idDocument_2 = $nerd->createDocumentFromUri($document_uri);

// Show info for document #2

$document_2 = $nerd->getDocument($idDocument_2);

echo "\n" . "idDocument: {$document_2->idDocument}";
echo "\n" . "text: {$document_2->text}";
echo "\n" . "language: {$document_2->language}";
echo "\n" . "type: {$document_2->type}";

About

PHP library to inferface NERD at http://nerd.eurecom.fr

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages