From ab7b34dfd34d7390e112d4f4b3b761e8c97cd446 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Camps Date: Mon, 21 Oct 2024 16:02:06 +0200 Subject: [PATCH] precised lang --- superstyl/preproc/features_extract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superstyl/preproc/features_extract.py b/superstyl/preproc/features_extract.py index 56de2748..8d8183ec 100755 --- a/superstyl/preproc/features_extract.py +++ b/superstyl/preproc/features_extract.py @@ -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: