大家在使用谷歌或者百度搜索时,输入搜索内容时,谷歌总是能提供非常好的拼写检查,比如你输入 speling,谷歌会马上返回 spelling。 下面是用python代码实现的一个简易但是具备完整功能的拼写检查器:import re, collections def words(text): return re.findall('[a-z]+', text.lower()) def train(f ...
大家在使用谷歌或者百度搜索时,输入搜索内容时,谷歌总是能提供非常好的拼写检查,比如你输入 speling,谷歌会马上返回 spelling。 下面是用python代码实现的一个简易但是具备完整功能的拼写检查器:import re, collections def words(text): return re.findall('[a-z]+', text.lower()) def train(f ...