redis-developer / redisbloom-moby-dick

Experiments with RedisBloom and the text from Moby Dick
MIT License
4 stars 3 forks source link

Add a count min sketch implementation to the Python code #5

Closed simonprickett closed 2 years ago

simonprickett commented 2 years ago

In this repo, we have code that looks at various probabilistic data structures included in Redis and RedisBloom. One that's not part of the demo code is the Count-Min Sketch (https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch).

Enhance the Python code to also count occurrences of each word from Moby Dick in a count-min sketch. You'll want to look at these Redis commands for this: https://redis.io/commands/?name=cms

Where the code outputs information about each data structure at the end, enhance it to use the CMS.QUERY (https://redis.io/commands/cms.query/) command to show the count as stored in the count-min sketch for each of the top 10 words reported by the top-k structure. To do this, you'll need to grab those words from the existing words variable (words = top_k_list[::2]) and feed them into the CMS.QUERY command, then logging the output.

Update the README.md in the python folder, as well as the repo level README.md.

This is part of our participation in Hacktoberfest 2022. Learn how to complete this issue here: https://redis.io/community/hacktoberfest/

Need help or want to talk to us? Join us on Discord where we have a dedicated Hacktoberfest channel: https://discord.gg/ueQwKUh5Z3

If you're interested in taking this issue on, please mention @simonprickett and @SuzeShardlow in the comments and ask to be assigned.

jupsimar commented 2 years ago

Am interested in reviewing the issue

mcbianconi commented 2 years ago

Hi @simonprickett and @SuzeShardlow , may I have this one?

SuzeShardlow commented 2 years ago

@jupsimar sorry, someone else jumped on this! Please check out our web page to see if there are any other issues you could work on: https://redis.io/community/hacktoberfest .