用Python做单词拼写检查

Wednesday, August 11, 2010

easy_install pyenchant

In [1]: import enchant
In [2]: d = enchant.Dict('en_US')
In [3]: d.check('python')
Out[3]: True
In [4]: d.suggest('pytho')
Out[4]: ['python', 'Python', 'Pythias', 'Pythagoras', 'Pythagorean', 'pathos', 'paths']

This entry was tagged Python

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top