From f14458132b2109e923a9765f293b6c542939d054 Mon Sep 17 00:00:00 2001 From: Rafael Goncalves Date: Mon, 8 Jul 2024 12:06:19 -0400 Subject: [PATCH] Update dependencies (closes #56) --- requirements.txt | 24 ++++++++++++------------ text2term/config.py | 2 +- text2term/syntactic_mapper.py | 9 ++++----- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/requirements.txt b/requirements.txt index cf8334d..f932ccf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,16 @@ -Owlready2~=0.44 +owlready2~=0.46 argparse~=1.4.0 -pandas~=2.0.3 -numpy~=1.24.2 -gensim~=4.3.0 -scipy~=1.10.1 -scikit-learn~=1.2.1 -setuptools~=68.2.2 -requests~=2.31.0 +pandas~=2.2.2 +numpy~=1.26.4 +gensim~=4.3.2 +scipy~=1.12.0 +scikit-learn~=1.5.1 +setuptools~=70.2.0 +requests~=2.32.3 tqdm~=4.66.1 -sparse_dot_topn~=0.3.4 -bioregistry~=0.10.6 +sparse-dot-topn~=1.1.3 +bioregistry~=0.11.10 nltk~=3.8.1 -rapidfuzz~=2.13.7 +rapidfuzz~=3.9.4 shortuuid~=1.0.11 -myst_parser~=2.0.0 \ No newline at end of file +myst-parser~=2.0.0 \ No newline at end of file diff --git a/text2term/config.py b/text2term/config.py index 60e3b39..773464b 100644 --- a/text2term/config.py +++ b/text2term/config.py @@ -1 +1 @@ -VERSION = "4.1.4" +VERSION = "4.2.0" diff --git a/text2term/syntactic_mapper.py b/text2term/syntactic_mapper.py index 5316303..ea84dbe 100644 --- a/text2term/syntactic_mapper.py +++ b/text2term/syntactic_mapper.py @@ -79,7 +79,7 @@ def compare_levenshtein(self, s1, s2): Calculates the normalized Levenshtein distance between s1 and s2. :return similarity between s1 and s2 as a float between 0 and 1 """ - similarity = rapidfuzz.string_metric.normalized_levenshtein(s1, s2)/100 + similarity = rapidfuzz.distance.Levenshtein.normalized_similarity(s1, s2) return similarity def compare_jaro(self, s1, s2): @@ -87,7 +87,7 @@ def compare_jaro(self, s1, s2): Calculates the Jaro similarity between s1 and s2. :return similarity between s1 and s2 as a float between 0 and 1 """ - similarity = rapidfuzz.string_metric.jaro_similarity(s1, s2)/100 + similarity = rapidfuzz.distance.Jaro.normalized_similarity(s1, s2) return similarity def compare_jarowinkler(self, s1, s2): @@ -95,16 +95,15 @@ def compare_jarowinkler(self, s1, s2): Calculates the Jaro-Winkler similarity between s1 and s2. :return similarity between s1 and s2 as a float between 0 and 1 """ - similarity = rapidfuzz.string_metric.jaro_winkler_similarity(s1, s2)/100 + similarity = rapidfuzz.distance.Jaro.normalized_similarity(s1, s2) return similarity def compare_indel(self, s1, s2): """ Calculates the normalized Indel distance between s1 and s2. - See: https://maxbachmann.github.io/RapidFuzz/Usage/fuzz.html#ratio :return similarity between s1 and s2 as a float between 0 and 1 """ - similarity = rapidfuzz.fuzz.ratio(s1, s2)/100 + similarity = rapidfuzz.distance.Indel.normalized_similarity(s1, s2) return similarity def compare_fuzzy_ratio(self, s1, s2):