PHP code example of trustami / trustami-ai
1. Go to this page and download the library: Download trustami/trustami-ai library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
trustami / trustami-ai example snippets
rustami\TrustamiAi\LangDetector;
use Trustami\TrustamiAi\Sentiment;
use Trustami\TrustamiAi\Summarizer;
$detector = new LangDetector("YOUR_TOKEN_HERE");
var_dump($detector->detect("This is a test text. It is used to test the Trustami.AI API.")); // string(2) "en"