cosine_cmp - compute cosine similarity between two documents
version 0.014
cosine_cmp [options] FILE1 FILE2
Cosine similarity is a measure of similarity between two vectors of an inner product space that measures the cosine of the angle between them. The cosine of 0 is 1, and less than 1 for any other angle; the lowest value of the cosine is -1. The cosine of the angle between two vectors thus determines whether two vectors are pointing in roughly the same direction. This is often used to compare documents in text mining. In addition, it is used to measure cohesion within clusters in the field of data mining.
(source)
This.
Feature vector length (in KB, default: 10).
Custom seed (integer).
How many bits do represent one character. The default value, 8, sacrifices Unicode handling but is fast and low on memory footprint. The value of 18 encompasses Basic Multilingual, Supplementary Multilingual and Supplementary Ideographic planes.
Text::SpeedyFx
Tiny & fast document similarity estimation
Cosine similarity
Stanislaw Pusep <stas@sysd.org>
This software is copyright (c) 2021 by Stanislaw Pusep.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Text::SpeedyFx, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::SpeedyFx
CPAN shell
perl -MCPAN -e shell install Text::SpeedyFx
For more information on module installation, please visit the detailed CPAN module installation guide.