Text identification
<p>Let's say I have a list of some strings (movie names in my case) and now I have a new sentence which contains one of the string from the list of strings. How do I find that which string does the sentence has? 
For eg:</p>

<pre><code>list_of_strings = ['20th century women', 'green is gold ', 'fire at sea']
sentence = 'Official Trailer | Green is  gold - Releasing Tomorrow'
</code></pre>

<p>For above case, solution should be able to find that <em>sentence</em> contains <em>green is gold</em>.
Please suggest which algorithm are available to solve this issue. Implementation/Library in Python will also work. </p>

<blockquote>
  <p>Sentences might contain little different spellings.</p>
</blockquote>

<p>List of strings has 10000-15000 strings.</p>

<p>Not sure off the top of my head whether there's a faster solution, but the following shouldn't be too bad:</p>

<pre><code>lower = sentence.lower()
for sub in list_of_string:
    if sub.lower() in sentence:
        print sub
</code></pre>

<p>I've converted both the sentence and the list to lowercase since you indicated by your example that you don't care about case. This will allow "Green" to match against "green", for example.</p>

python algorithm text