Spaces:
Runtime error
Runtime error
Replace 'punkt' with 'punkt_tab' to support nltk>=3.9 and fix vulnerability
#6
by
albertvillanova
HF staff
- opened
meteor.py
CHANGED
@@ -120,7 +120,9 @@ class Meteor(evaluate.Metric):
|
|
120 |
import nltk
|
121 |
|
122 |
nltk.download("wordnet")
|
123 |
-
if NLTK_VERSION >= version.Version("3.
|
|
|
|
|
124 |
nltk.download("punkt")
|
125 |
if NLTK_VERSION >= version.Version("3.6.6"):
|
126 |
nltk.download("omw-1.4")
|
|
|
120 |
import nltk
|
121 |
|
122 |
nltk.download("wordnet")
|
123 |
+
if NLTK_VERSION >= version.Version("3.9.0"):
|
124 |
+
nltk.download("punkt_tab")
|
125 |
+
elif NLTK_VERSION >= version.Version("3.6.5"):
|
126 |
nltk.download("punkt")
|
127 |
if NLTK_VERSION >= version.Version("3.6.6"):
|
128 |
nltk.download("omw-1.4")
|