From c9cf818416fa95b4086a3fde84e8ed39ce91381b Mon Sep 17 00:00:00 2001 From: Kwan-Yuet Ho Date: Mon, 28 Dec 2020 22:53:33 -0500 Subject: [PATCH 1/2] Python 2 to 3 upgrade on the use of `filter` --- setup.py | 2 +- shorttext/metrics/embedfuzzy/jaccard.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index a35d14e2..db851f60 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ def test_requirements(): setup(name='shorttext', - version='1.4.4', + version='1.4.5', description="Short Text Mining", long_description=package_description(), long_description_content_type='text/markdown', diff --git a/shorttext/metrics/embedfuzzy/jaccard.py b/shorttext/metrics/embedfuzzy/jaccard.py index 95d9ac7c..15e3de1a 100644 --- a/shorttext/metrics/embedfuzzy/jaccard.py +++ b/shorttext/metrics/embedfuzzy/jaccard.py @@ -23,8 +23,8 @@ def jaccardscore_sents(sent1, sent2, wvmodel, sim_words=lambda vec1, vec2: 1-cos """ tokens1 = tokenize(sent1) tokens2 = tokenize(sent2) - tokens1 = filter(lambda w: w in wvmodel, tokens1) - tokens2 = filter(lambda w: w in wvmodel, tokens2) + tokens1 = list(filter(lambda w: w in wvmodel, tokens1)) + tokens2 = list(filter(lambda w: w in wvmodel, tokens2)) allowable1 = [True] * len(tokens1) allowable2 = [True] * len(tokens2) From ef1f94de97d317caf2adb0078c76afc59b4d9d28 Mon Sep 17 00:00:00 2001 From: Kwan-Yuet Ho Date: Mon, 28 Dec 2020 23:00:02 -0500 Subject: [PATCH 2/2] documentation updated --- README.md | 3 +++ docs/conf.py | 2 +- docs/news.rst | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bb039a1..298831f1 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ If you would like to contribute, feel free to submit the pull requests. You can ## News + +* 12/28/2020: `shorttext` 1.4.5 released. +* 12/24/2020: `shorttext` 1.4.4 released. * 11/10/2020: `shorttext` 1.4.3 released. * 10/18/2020: `shorttext` 1.4.2 released. * 09/23/2020: `shorttext` 1.4.1 released. diff --git a/docs/conf.py b/docs/conf.py index b1188675..890f5452 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,7 +58,7 @@ # The short X.Y version. version = u'1.4' # The full version, including alpha/beta/rc tags. -release = u'1.4.4' +release = u'1.4.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/news.rst b/docs/news.rst index cef5b813..25169c71 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,7 @@ News ==== +* 12/28/2020: `shorttext` 1.4.5 released. * 12/24/2020: `shorttext` 1.4.4 released. * 11/10/2020: `shorttext` 1.4.3 released. * 10/18/2020: `shorttext` 1.4.2 released. @@ -64,6 +65,11 @@ News What's New ---------- +Release 1.4.5 (December 28, 2020) +--------------------------------- + +* Bugs fixed about Python 2 to 3 updates, `filter` in `shorttext.metrics.embedfuzzy`. + Release 1.4.4 (December 24, 2020) ---------------------------------