Skip to main content

MurmurHash3 https://code.google.com/p/smhasher/

Project description

murmurhash is a fast hash function ::
>>> import featurehash
    >>> featurehash.hash("abc")  #return the hashcode of the string "abc"
            -1277324294
    >>> featurehash.transform_feature("abc")   #return the code and the sign of hashcode;the code is equal to "hashcode mod 8388608(2^23) + 1"
            (2255879, -1.0)
    >>> featurehash.transform_features(["abc","edf","efd","123","efd"]) #pass a sequence to the function,return the sorted unique feature code.
            [124, 2255879, 3759816, 8023169]
    >>> featurehash.transform_features(["abc","edf","efd","123","efd"],8388607) #pass a sequence and upper_bound;upper_bound default 8388608(2^23)
    [124, 2256031, 3760024, 8023393]
    >>> featurehash.transform_features(["abc","edf","efd","123","efd"],8388607,0) #pass a sequence , upper_bound and min value; min value default 1;
    [123, 2256030, 3760023, 8023392]
    >>> featurehash.transform_features(["abc","edf","efd","123","efd"],8388607,1,1) #pass a sequence , upper_bound, min value and seed; seed value default 0;the same application must must the same seed,ensure the consistent value.
    [124, 661165, 3231265, 8317658]

Modified by jianghuachinacom@163.com

zsp windows,linux python lib

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

featurehash-1.0.2.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file featurehash-1.0.2.tar.gz.

File metadata

  • Download URL: featurehash-1.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for featurehash-1.0.2.tar.gz
Algorithm Hash digest
SHA256 42ef31e52d9f45468197c1664315ddb7e1284050ee5fa112825dec6c721d693e
MD5 8c3b2ace82c73dfb316c393e7942626a
BLAKE2b-256 2a20450759e9cac696e191b2cf4abcf1e31c86b4e9b1ee9ccb4bddb6a91baa7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page