fix nltk package

pull/139/head
jwyang 2023-10-05 17:57:17 +00:00
parent 7f21a4fff9
commit 4e58f99806
1 changed files with 2 additions and 1 deletions

View File

@ -2,11 +2,12 @@ import random
import torch
import nltk
nltk.data.path.append('/mnt/data/nltk_data')
import numpy as np
from utils.constants import IMAGENET_DEFAULT_TEMPLATES
nltk.download('punkt', quiet=True)
nltk.download('averaged_perceptron_tagger', quiet=True)
def get_tag(tokenized, tags):
if not isinstance(tags, (list, tuple)):