How to use the rapidfuzz.fuzz.token_sort_ratio function in RapidFuzz

To help you get started, we’ve selected a few RapidFuzz 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 giulionf / realtweetornotbot / src / realtweetornotbot / bot / twittersearch / tweetfinder.py View on Github external
def __score_result(tweet, search_criteria):
        score = fuzz.token_sort_ratio(tweet.text, search_criteria.content)
        return score
github RockefellerArchiveCenter / scripts / archivessnake / edit_notes.py View on Github external
def contains_match(content, search_string):
    """Returns True if user-provided note input matches the corresponding note within a given ratio (CONFIDENCE_RATIO)."""
    ratio = fuzz.token_sort_ratio(content.lower(), search_string.lower())
    return True if ratio > CONFIDENCE_RATIO else False