PHP code example of imoca / count-min-sketch

1. Go to this page and download the library: Download imoca/count-min-sketch 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/ */

    

imoca / count-min-sketch example snippets


    $cms = new Imoca\CountMinSketch\CountMinSketch($nb_hash, $nb_width, 'path_to_file_store');
    $cms->record("word_to_insert");
    $counter = $cms->count("word_to_count");

    echo $cms; //working