API Reference

Hashes

exception floc.hashes.SimHashStringError[source]

Bases: RuntimeError

Represents an error occured on Go Side when calling simHashString fun.

floc.hashes.cityhash(string)[source]
Return type

int

floc.hashes.cityhash_with_seeds(string, first_seed, second_seed)[source]
Return type

int

floc.hashes.cityhash_with_seed(string, seed)[source]
Return type

int

floc.hashes.sim_hash_string(domains, k_max_numbers_of_bits_in_floc=50)[source]
Return type

int

Simulate

exception floc.simulate.SimulateError[source]

Bases: RuntimeError

Represents an error occured on Go Side when calling the simulate func.

floc.simulate.simulate()

Sorting

exception floc.sorting.ApplySortingLshError[source]

Bases: RuntimeError

Represents an error occured on Go Side when calling the func.

floc.sorting.apply_sorting_lsh(sim_hash, sorting_cluster_data, k_max_numbers_of_bits_in_floc=50, check_sensiveness=True)[source]
Return type

int

Go Types

class floc.go_types.ApplySortingLshResult[source]

Bases: _ctypes.Structure

class floc.go_types.GoInterface[source]

Bases: _ctypes.Structure

class floc.go_types.GoSlice[source]

Bases: _ctypes.Structure

__len__()[source]

Returns the len from the go slice struct.

Return type

int

class floc.go_types.GoString[source]

Bases: _ctypes.Structure

__bool__()[source]

Emulate the same python string behavior.

I it’s empty return false, otherwise return True

Return type

bool

__str__()[source]

Returns the string value from go string struct.

Return type

str

class floc.go_types.SimHashStringResult[source]

Bases: _ctypes.Structure

class floc.go_types.SimulateResult[source]

Bases: _ctypes.Structure

floc.go_types.covert_str_list_to_go_slice(str_list)[source]
Return type

GoSlice

FLoC