From af41247ec0dec37ae61a38aff0dc72771bfceca5 Mon Sep 17 00:00:00 2001 From: TurconiAndrea Date: Wed, 28 Jul 2021 23:05:20 +0200 Subject: [PATCH] Fixed some bugs. Update version from 0.3.9 to 0.3.10 --- recipe_tagger/recipe_tagger.py | 3 +-- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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",