1. Go to this page and download the library: Download bluefission/synthetiq 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/ */
bluefission / synthetiq example snippets
use BlueFission\SynthetIQ\SynthetIQ;
use BlueFission\SynthetIQ\Training\RouteTrainer;
use BlueFission\Automata\Language\{Interpreter, Grammar, StemmerLemmatizer, Documenter, Walker};
use BlueFission\Automata\Analysis\KeywordTopicAnalyzer;
use BlueFission\Automata\Strategy\NaiveBayesTextClassification;
$dialogue = ommands'], $tokens),
$documenter,
new Walker()
);
$analyzer = new KeywordTopicAnalyzer(new NaiveBayesTextClassification, 'models/ml/');
$ai = new SynthetIQ($interpreter, $analyzer);
RouteTrainer::train($ai, $dialogue, $intentBoosts);
$result = $ai->processInputEnvelope('hello');
echo $result['response'];
use BlueFission\SynthetIQ\Clients\ClientResolver;
use BlueFission\SynthetIQ\Clients\WeatherClientInterface;
$resolver = ClientResolver::make(
use BlueFission\SynthetIQ\Policy\NullPolicyFilter;
$ai->addPolicyFilter(new NullPolicyFilter());
$envelope = $ai->processInputEnvelope('hello');
$audit = $envelope['audit'];
use BlueFission\SynthetIQ\Flow\ConversationFlow;
$flow = ConversationFlow::fromArray(rent = $envelope['flow']['current_state'];
use BlueFission\SynthetIQ\State\ConversationState;
$state = ConversationState::fromArray(e = $envelope['state']['tone'];
use BlueFission\SynthetIQ\Handoff\ContextEnvelope;
use BlueFission\SynthetIQ\Handoff\ContextHandoff;
use BlueFission\SynthetIQ\Profiles\ConversationProfile;
$config = ontextHandoff())->handoff(
$profile,
$context,
$config['handoff']['
use BlueFission\SynthetIQ\Scenes\SceneContract;
$scenes = gh']);