Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 597 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 597 Bytes

similar

A dependency less python library made for finding similar text inspired from similar

Usage

import similar

match = similar.best_match("apply", ["pickle", "apple", "orange"])
print(match)
> apple

Extras

Also works with

file -

import similar

match = similar.best_match("apply", open("words.txt", "r"))
print(match)
> apple

or generator object

import similar

def genwords():
    for word in ["picke", "apple", "orange"]:
        yield word
		
match = similar.best_match("apply", genwords())
print(match)
> apple