<commit_before><?php error_reporting(0);
/* Example Merk API Suggest proxy script
 *
 * Required PHP version: PHP >= 5.4.0
 *
 */


# !!!! Change it for your Authorization token !!!!!
#$token = "Your token goes here";
$token = "<KEY>";



header('Access-Control-Allow-Origin: *');
$request = curl_init('https://api.merk.cz:443/suggest/?' . http_build_query($_GET));
curl_setopt($request, CURLOPT_HTTPHEADER, array("Authorization: Token " . $token));
curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE);
$data = curl_exec($request);
$status = curl_getinfo($request, CURLINFO_HTTP_CODE);
http_response_code($status); // PHP >= 5.4.0
header('Content-Type: application/json');
echo $data;
curl_close($request);<commit_msg>transfer proxy errors to merkSuggestify plugin<commit_after><?php error_reporting(0);
/* Example Merk API Suggest proxy script
 *
 * Required PHP version: PHP >= 5.4.0
 *
 */


# !!!! Change it for your Authorization token !!!!!
$token = "Your token goes here";



header('Access-Control-Allow-Origin: *');
$request = curl_init('https://api.merk.cz:443/suggest/?' . http_build_query($_GET));
curl_setopt($request, CURLOPT_HTTPHEADER, array("Authorization: Token " . $token));
curl_setopt($request, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($request, CURLOPT_RETURNTRANSFER, TRUE);
$data = curl_exec($request);
$status = curl_getinfo($request, CURLINFO_HTTP_CODE);
http_response_code($status); // PHP >= 5.4.0
header('Content-Type: application/json');
echo $data;
curl_close($request);
{'fraction_non_alphanumeric': 0.16838046272493573, 'fraction_numerical': 0.012853470437017995, 'mean_word_length': 6.44976076555024, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2528200', 'n_tokens_mistral': 540, 'n_tokens_neox': 502, 'n_words': 110}