Pepperminty Wiki Module API


PHP Library to calculate and compare Nilsimsa digests.

The Nilsimsa hash is a locality senstive hash function. Generally similar documents will have similar Nilsimsa digests. The Hamming distance between the digests can be used to approximate the similarity between documents. For further information consult and the references (particularly Damiani et al.)

Implementation details: The Nilsimsa class takes in a data parameter which is the string of the document to digest Calling the methods hexdigest() and digest() give the nilsimsa digests in hex or array format. The helper function compare_digests takes in two digests and computes the Nilsimsa score. You can also use compare_files() and compare_strings() to compare files and strings directly.

This code is a port of py-nilsimsa located at

Interfaces, Classes, Traits and Enums

The MIT License (MIT)

Table of Contents

lines_count()  : mixed



lines_count(mixed $handle) : mixed
$handle : mixed
Return values

Search results