These metrics are useful in many different domains such as search engines, recommender systems, and RAG with LLMs.
This implementation has easy to follow source code and unit tests. Let me know what you think and if you have any suggestions, thanks for checking it out!