how i can make my Wikipedia output with count all words in this text and arrangement them with the top 10 most existing words and print them without any symbols?
import wikipedia
wikipedia.set_lang("en")
a = wikipedia.page("bitcoin")
words = a.content
print(words)
Considering that the var words is a string, you can use nltk lib to split your string in a list of words, and then, perform your tasks. Something like that:
Now, to remove undesired words or symbols, you will need to apply a func in your string, try that: