BSD Ports

textproc/p5-Algorithm-RabinKarp 0.41_2 FreeBSD

Rabin-Karp streaming hash

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
textproc, perl5
Package size
12.8 KiB, 25.0 KiB installed

Description

This is an implementation of Rabin and Karp's streaming hash, as described in "Winnowing: Local Algorithms for Document Fingerprinting" by Schleimer, Wilkerson, and Aiken. Following the suggestion of Schleimer, I am using their second equation:

$H[ $c[2..$k + 1] ] = (( $H[ $c[1..$k] ] - $c[1] ** $k ) + $c[$k+1] ) * $k

The results of this hash encodes information about the next k values in the stream (hense k-gram.) This means for any given stream of length n integer values (or characters), you will get back n - k + 1 hash values.

For best results, you will want to create a code generator that filters your data to remove all unnecessary information. For example, in a large english document, you should probably remove all white space, as well as removing all capitalization.

In the other systems

SystemPortVersion
FreeBSDtextproc/p5-Algorithm-RabinKarp0.41_2
DragonFlytextproc/p5-Algorithm-RabinKarp0.41_2

Install

Binary package:

pkg install p5-Algorithm-RabinKarp

From the ports tree:

cd /usr/ports/textproc/p5-Algorithm-RabinKarp/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Algorithm-RabinKarp>0:textproc/p5-Algorithm-RabinKarp

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.41_20.41_20.41_20.41_20.41_2
FreeBSD:14:quarterly0.41_20.41_2n/a0.41_20.41_2
FreeBSD:15:latest0.41_20.41_2n/a0.41_20.41_2
FreeBSD:15:quarterly0.41_20.41_2n/an/an/a
FreeBSD:16:latest0.41_20.41_2n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 1
Run dependencies 1

No port depends on this one.

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 6
  • bin/rabin.pl
  • %%PERL5_MAN3%%/Algorithm::RabinKarp.3.gz
  • %%PERL5_MAN3%%/Algorithm::RabinKarp::Util.3.gz
  • %%SITE_PERL%%/Algorithm/RabinKarp.pm
  • %%SITE_PERL%%/Algorithm/RabinKarp/Util.pm
  • %%SITE_PERL%%/Algorithm/rabin.pl
distinfo 1
FileSizeSHA256
Algorithm-RabinKarp-0.41_1.tar.gz718209e3ae7138a99ddde4337d86d62f2f59530153b192bc33772708c9d2a55f9589
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.