一种方式是利用nltk的断句功能
http://www.nltk.org/api/nltk.tokenize.html
nltk.tokenize.punkt 模块
断句的问题:简单的断句虽然可以利用一些标点符号断句,但是这里面有个问题是比如姓氏 Mr. Smith这样的句子,断句就会有问题。
这个模块需要大的预料库进行训练 。
用法也很简单
>>> import nltk.data
>>> text = '''
... Punkt knows that the periods in Mr. Smith and Johann S. Bach
... do not mark sentence boundaries. And sometimes sentences
... can start with non-capitalized words. i is a good variable
... name.
... '''
>>> se