How to use the preshed.bloom.BloomFilter function in preshed

To help you get started, we’ve selected a few preshed examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github explosion / spaCy / spacy / lookups.py View on Github external
def from_bytes(self, bytes_data):
        """Load a table from a bytestring.

        bytes_data (bytes): The data to load.
        RETURNS (Table): The loaded table.

        DOCS: https://spacy.io/api/lookups#table.from_bytes
        """
        loaded = srsly.msgpack_loads(bytes_data)
        data = loaded.get("dict", {})
        self.name = loaded["name"]
        self.bloom = BloomFilter().from_bytes(loaded["bloom"])
        self.clear()
        self.update(data)
        return self

preshed

Cython hash table that trusts the keys are pre-hashed

MIT
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis

Similar packages