title: Python: Natural Language Processing (NLP)
body: <p>I have a billion strings in a HiveQL database. I am loading them into Python. The strings are not space-delimited, and look like:</p>
  
  <pre><code>"mynameisanon"
  ...
  "helloworld"
  </code></pre>
  
  <p>I would like to count the number of words in every string. But first, I'd need a dictionary. I don't know how to get a dictionary of words, but suppose I have the following dictionary:</p>
  
  <pre><code>{ hello, world, my, name, is}
  </code></pre>
  
  <p>Then the function would work like:</p>
  
  <pre><code>Input:  mynameisanon
  Output: 3
  
  Input:  helloworld
  Output: 2
  </code></pre>
  
  <p>In the end, I would like a Pandas table.</p>