Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added checking for zero depth in lch_similarity #421
lch_similarity method raises a ZeroDivisionError when a synset has no hypernyms, since LCH distance is -log(p/2d), so when d == 0, it throws a ZeroDivisionError.
I added checking for when depth == 0 and had the function return None in this case, as LCH similarity is undefined in this instance.