擅长:python、mysql、java
<p>使用<code>from nltk.tokenize import sent_tokenize</code>怎么样?</p>
<pre><code>sent_tokenize("Hello SF Python. This is NLTK.")
["Hello SF Python.", "This is NLTK."]
</code></pre>
<p>然后你可以这样使用这个句子列表:</p>
<pre><code>for sentence in my_list:
# test if this sentence contains the words you want
# using all() method
</code></pre>
<p>更多信息<a href="http://www.slideshare.net/japerk/nltk-in-20-minutes" rel="nofollow">here</a></p>