python stopwords

Asked

Viewed 1,415 times

-1

Is there any way stopword without using the import nlkt? I’m searching the web but I’m not finding another way. I can’t install the nltk in my 64-bit Python 3.6. I follow all the steps, but finished the steps and already in the code the import associated (import nlkt) is not recognised in the same.

  • 1

    Is not NLKT is NLTK. Installed NLTK Data ? Import: import nltk and then: nltk.download()

  • Yes, I was wrong. I’ve done it, but I couldn’t

  • Which error is returned ? See if that question in the ONLY can help you.

  • One option is to create the list with the words you want to remove and create a function to replace with space, for example.

  • Colleague, use ready list: https://github.com/stopwords-iso/stopwords-pt. In this git the programmer has already left the terms in Python list, is copy and use.

1 answer

1

How about you try the following:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from nltk.corpus import stopwords
import nltk

nltk.download('stopwords')

language = "french"

for word in stopwords.words(language):
    print (word)

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.