1 | <?php |
||
8 | class Tone extends AbstractApi |
||
9 | { |
||
10 | /** |
||
11 | * Analyze tone |
||
12 | * |
||
13 | * @param $text |
||
14 | * @param array|null $params |
||
15 | * |
||
16 | * @return mixed|\Psr\Http\Message\ResponseInterface |
||
17 | * |
||
18 | * @throws \IBM\Watson\Common\Exception\UnknownErrorException |
||
19 | * @throws \IBM\Watson\Common\Exception\NotFoundException |
||
20 | * @throws \IBM\Watson\Common\Exception\InsufficientPrivilegesException |
||
21 | * @throws \Http\Client\Exception |
||
22 | * @throws \IBM\Watson\ToneAnalyzer\Exception |
||
23 | * @throws \Exception |
||
24 | */ |
||
25 | 21 | public function analyze($text, array $params = null) |
|
64 | |||
65 | /** |
||
66 | * Analyze HTML |
||
67 | * |
||
68 | * @param string $text |
||
69 | * @param array $params |
||
70 | * @param array $headers |
||
71 | * |
||
72 | * @return \Psr\Http\Message\ResponseInterface |
||
73 | * |
||
74 | * @throws \Http\Client\Exception |
||
75 | * @throws \Exception |
||
76 | */ |
||
77 | 3 | public function analyzeHtml($text, array $params = [], array $headers = []) |
|
83 | |||
84 | /** |
||
85 | * Analyze JSON |
||
86 | * |
||
87 | * @param string $text |
||
88 | * @param array $params |
||
89 | * @param array $headers |
||
90 | * |
||
91 | * @return \Psr\Http\Message\ResponseInterface |
||
92 | * |
||
93 | * @throws \Http\Client\Exception |
||
94 | * @throws \Exception |
||
95 | */ |
||
96 | 3 | public function analyzeJson($text, array $params = [], array $headers = []) |
|
102 | } |
||
103 |