effective-soft / intellexer-php
Intellexer PHP SDK
v0.1
2018-01-08 09:39 UTC
Requires
- php: >=5.5
- guzzlehttp/guzzle: ^6.3
- psr/log: ^1.0
Requires (Dev)
- monolog/monolog: ^1.20
This package is not auto-updated.
Last update: 2024-12-20 10:26:58 UTC
README
Provides easy-to-use wrappers for main Intellexer API semantics products.
Installing via composer:
composer require effective-soft/intellexer-php
Example usage:
<?php require_once 'vendor/autoload.php'; $intellexerClient = new \EffectiveSoft\Intellexer\IntellexerClient('YOUR_API_KEY'); $linguisticProcessor = new \EffectiveSoft\Intellexer\LinguisticProcessor($intellexerClient); $url = 'https://www.intellexer.com/'; var_dump($linguisticProcessor->analyzeText(file_get_contents($url)));
Example usage with logger:
<?php require_once 'vendor/autoload.php'; $logFile = sprintf('%s/%s.log', sys_get_temp_dir() . DIRECTORY_SEPARATOR, 'intellexer_api'); $logger = new \Monolog\Logger('intellexerApi'); $logger->pushHandler( new \Monolog\Handler\StreamHandler( $logFile, \Monolog\Logger::DEBUG, null, 0777 ) ); $intellexerClient = new \EffectiveSoft\Intellexer\IntellexerClient('YOUR_API_KEY'); $intellexerClient->setLogger($logger); $linguisticProcessor = new \EffectiveSoft\Intellexer\LinguisticProcessor($intellexerClient); $url = 'https://www.intellexer.com/'; var_dump($linguisticProcessor->analyzeText(file_get_contents($url))); var_dump(file_get_contents($logFile));