How to use the textdistance.overlap.similarity function in textdistance

To help you get started, we’ve selected a few textdistance 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 strinking / futaba / futaba / converters / user.py View on Github external
def similar_text(word1, word2) -> float:
    """
    Determines if the two strings are similar enough given the passed threshold.
    An alias for textdistance.overlap.similarity().
    """

    return textdistance.overlap.similarity(word1, word2)
github strinking / futaba / futaba / parse.py View on Github external
def similar_names(word1, word2) -> float:
    '''
    Determines if the two strings are similar enough given the passed threshold.
    An alias for textdistance.overlap.similarity().
    '''

    return textdistance.overlap.similarity(word1, word2)