for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the strays/baidu-ai.
*
* (c) strays <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Strays\BaiDuAi\Language\Simnet;
use Strays\BaiDuAi\Kernel\BaseClient;
class Client extends BaseClient
{
/**
* 短文本相似度.
* @param string $text_1
* @param string $text_2
* @param string $model
* @return string
public function send(string $text_1, string $text_2, string $model = 'BOW')
$body = [
'text_1' => $text_1,
'text_2' => $text_2,
'model' => $model,
];
return $this->httpPostJson('/rpc/2.0/nlp/v2/simnet', $body);
}