Simple cosine similarity implementation in PHP
Cosine similarity is a widely used similarity measure of two texts. This simple code computes cosine similarity of two text files given as parameters. To use this, php-cli (PHP command line interpreter) must be working. The output is written to the STDOUT. I have made the cosine similarity code work in PHP. I have not implemented all of the code. The code is developed using the ideas and piece of codes in various web sites.
php computeCosine.php file1 file2
This code belongs to public. You can utilize it any way you like.