Unable to use word.tokenize() functionc from nltk package
<p>Unable to call the word_tokenize() from the nltk package. Even though I had performed the following steps in terminal</p>

<pre><code>&gt;&gt;python
&gt;&gt;import nltk
&gt;&gt;nltk.download('all')
</code></pre>

<p>and following is the simple code for tokenizing</p>

<pre><code>import nltk
sentence = """At eight o'clock on Thursday morning. Arthur didn't feel very good."""
tokens = nltk.word_tokenize(sentence)
tokens
</code></pre>

<p>but in spyder console it shows</p>

<pre><code>import nltk
File "nltk.py", line 3, in &lt;module&gt;
tokens = nltk.word_tokenize(sentence)
AttributeError: 'module' object has no attribute 'word_tokenize'
&gt;&gt;&gt; 
</code></pre>