From 384920c7ebace0f21bbf6345b033b5987c397190 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Thu, 12 Sep 2024 08:56:49 +0200 Subject: [PATCH] Fix import in word_length --- measurements/word_length/word_length.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/measurements/word_length/word_length.py b/measurements/word_length/word_length.py index 5b31cd2d..873fa3c9 100644 --- a/measurements/word_length/word_length.py +++ b/measurements/word_length/word_length.py @@ -20,6 +20,12 @@ import evaluate +if evaluate.config.PY_VERSION < version.parse("3.8"): + import importlib_metadata +else: + import importlib.metadata as importlib_metadata + + NLTK_VERSION = version.parse(importlib_metadata.version("nltk")) _DESCRIPTION = """