title: Why does `import word_tokenize` from NLTK works in the interpreter but not in my script?
body: <p>I am trying to tokenize a sentence using nltk. when i do it through python shell i get the correct answer.</p>
  
  <pre><code>&gt;&gt;&gt; import nltk
  &gt;&gt;&gt; sentence = "Mohanlal made his acting debut in Thiranottam (1978), but the film got released only after 25 years due to censorship issues."
  &gt;&gt;&gt; tokens = nltk.word_tokenize(sentence)
  &gt;&gt;&gt; tokens
  ['Mohanlal', 'made', 'his', 'acting', 'debut', 'in', 'Thiranottam', '(', '1978', ')', ',', 'but', 'the', 'film', 'got', 'released', 'only', 'after', '25', 'years', 'due', 'to', 'censorship', 'issues', '.']
  </code></pre>
  
  <p>But when i write the same code in a file and try to run it i got the following error.</p>
  
  <pre><code>    Traceback (most recent call last):
    File "tokenize.py", line 1, in &lt;module&gt;
      import nltk
    File "/usr/local/lib/python2.7/dist-packages/nltk/__init__.py", line 114, in &lt;module&gt;
      from nltk.collocations import *
    File "/usr/local/lib/python2.7/dist-packages/nltk/collocations.py", line 38, in &lt;module&gt;
      from nltk.util import ngrams
    File "/usr/local/lib/python2.7/dist-packages/nltk/util.py", line 13, in &lt;module&gt;
      import pydoc
    File "/usr/lib/python2.7/pydoc.py", line 55, in &lt;module&gt;
      import sys, imp, os, re, types, inspect, __builtin__, pkgutil, warnings
    File "/usr/lib/python2.7/inspect.py", line 39, in &lt;module&gt;
      import tokenize
    File "/home/gadheyan/Project/Codes/tokenize.py", line 2, in &lt;module&gt;
      from nltk import word_tokenize
  ImportError: cannot import name word_tokenize
  </code></pre>
  
  <p>Here's the code that i run.</p>
  
  <pre><code>import nltk
  from nltk import word_tokenize
  
  sentence = "Mohanlal made his acting debut in Thiranottam (1978), but the film got released only after 25 years due to censorship issues."
  tokens = nltk.word_tokenize(sentence)
  print tokens
  </code></pre>