Skip to content

Commit

Permalink
precised lang
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste-Camps committed Oct 21, 2024
1 parent 52c4baa commit ab7b34d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superstyl/preproc/features_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def count_features(text, feats ="words", n = 1):
#POS in english with NLTK - need to propose spacy later on
elif feats == "pos":
try:
nltk.data.find('taggers/averaged_perceptron_tagger')
nltk.data.find('taggers/averaged_perceptron_tagger_eng')
except:
nltk.download('averaged_perceptron_tagger')
nltk.download('averaged_perceptron_tagger_eng')
words = nltk.tokenize.wordpunct_tokenize(text)
pos_tags = [pos for word, pos in nltk.pos_tag(words)]
if n > 1:
Expand Down

0 comments on commit ab7b34d

Please sign in to comment.