MCPcopy Create free account
hub / github.com/feast-dev/feast / fuzzy_match

Function fuzzy_match

sdk/python/feast/api/registry/rest/rest_utils.py:635–646  ·  view source on GitHub ↗

Simple fuzzy matching using character overlap

(query: str, text: str)

Source from the content-addressed store, hash-verified

633
634
635def fuzzy_match(query: str, text: str) -> float:
636 """Simple fuzzy matching using character overlap"""
637 if not query or not text:
638 return 0.0
639
640 query_chars = set(query)
641 text_chars = set(text)
642
643 overlap = len(query_chars.intersection(text_chars))
644 similarity = overlap / len(query_chars.union(text_chars))
645
646 return similarity
647
648
649def list_entities(

Callers 1

Calls 1

unionMethod · 0.80

Tested by

no test coverage detected