Skip to content

Commit 505d5fa

Browse files
authored
autolabel fix nltk download (PaddlePaddle#763)
1 parent d51cf90 commit 505d5fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

paddlemix/appflow/image2text_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _postprocess(self, inputs):
111111
def _generate_tags(self, caption):
112112
lemma = nltk.wordnet.WordNetLemmatizer()
113113

114-
nltk.download(["punkt", "averaged_perceptron_tagger", "wordnet"])
114+
nltk.download(["punkt","punkt_tab","averaged_perceptron_tagger","averaged_perceptron_tagger_eng","wordnet"])
115115
tags_list = [word for (word, pos) in nltk.pos_tag(nltk.word_tokenize(caption)) if pos[0] == "N"]
116116
tags_lemma = [lemma.lemmatize(w) for w in tags_list]
117117
tags = ",".join(map(str, tags_lemma))

0 commit comments

Comments
 (0)