Spaces:
Runtime error
Runtime error
Commit
•
8b38382
1
Parent(s):
7529199
Support nltk>=3.9 to fix vulnerability
Browse filesSee:
- Root cause issue: https://github.com/nltk/nltk/issues/3266
- Breaking change when using "punkt_tab" instead of "punkt": https://github.com/nltk/nltk/issues/3293
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")
|