diff --git a/recipe_tagger/recipe_tagger.py b/recipe_tagger/recipe_tagger.py index 90ec874..1597351 100644 --- a/recipe_tagger/recipe_tagger.py +++ b/recipe_tagger/recipe_tagger.py @@ -132,8 +132,7 @@ def search_ingredient_hypernyms(ingredient): hypernym_sim.append(hypernym.wup_similarity(cat)) best_sim = sim.index(max(sim)) - if hypernym: - best_hyp = hypernym_sim.index(max(hypernym_sim)) + best_hyp = hypernym_sim.index(max(hypernym_sim)) if hypernym else None if hypernym or best_sim == best_hyp: return FoodCategory(best_sim).name diff --git a/setup.py b/setup.py index feda99b..84c0371 100644 --- a/setup.py +++ b/setup.py @@ -16,14 +16,14 @@ setup( name="recipe-tagger", packages=find_packages(include=["recipe_tagger"]), - version="0.3.9", + version="0.3.10", description="A library for tagging and classify recipes", author="Andrea Turconi", license="MIT", long_description=README, long_description_content_type="text/markdown", url="https://github.com/TurconiAndrea/recipe-tagger", - download_url="https://github.com/TurconiAndrea/recipe-tagger/archive/refs/tags/0.3.9.tar.gz", + download_url="https://github.com/TurconiAndrea/recipe-tagger/archive/refs/tags/0.3.10.tar.gz", keywords=["food", "recipe", "tag", "tagging", "ingredient"], install_requires=[ "wikipedia-api",