Documentation
Start of work
To use our API you need to submit a request to our service http://rephrase-tool.com/api/index.php with the name of the desired method and required parameters.
Example of using the getcontext method:
// PHP usage example $post = [ 'method' => 'getSynText', 'text' => 'The text for the paraphrase', 'backLight' => 1, // optional parameter, if passed, word highlighting will be enabled ]; $ch = curl_init('https://rephrase-tool.com/api/index.php'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-Requested-With: XMLHttpRequest", ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $resutl_syn = curl_exec($ch); curl_close($ch); $syn = json_decode($resutl_syn, true); // server response print_r($syn); Array ( [modified_text] => The text for the paraphrasis [percent_unique] => 50.00 [count_replace] => 2 [count_symbol] => 41 [time] => 0.57769 )
Methods
getSynText
The method is used to obtain paraphrase text.
Passed parameter
Name | Value |
---|---|
method | getSynText |
text | Text up to 5000 characters |
The answer is returned in the format JSON
Name | Value | Type |
---|---|---|
modified_text | Paraphrase text | string |
percent_unique | Percentage of changed text | float |
count_replace | Number of substitutions in the text | int |
count_symbol | Number of characters in the text | int |
time | Script execution time | float |