我如何才能“正常化”?
word = 'yeeeessssssss'至
word = 'yes'发布于 2012-06-11 22:50:47
使用enchant模块检查返回的单词是否为英文单词:
import enchant,itertools
d_us= enchant.Dict("en_US")
d_uk= enchant.Dict("en_UK")
words=[]
teks=teks='yeeeessssssss'
for x in itertools.permutations(set(teks)):
if d_us.check(''.join(x)) or d_uk.check(''.join(x)):
words.append(''.join(x))https://stackoverflow.com/questions/10982240
复制相似问题