The Organic brew: How to Write a Spelling Corrector (incidentally, how cool is python!)

January 9th, 2010 / Categorized under: Personal Blogs

import re, collections def words(text): return re.findall('[a-z]+', text.lower()) def train(features): model = collections.defaultdict(lambda: 1) for f in features: model[f] += 1 return model NWORDS = train(words(file('big.t…

Read Full Blog Post

Related Posts

RSSSubscribe to the feed now.

About PakBlogging.com

PakBlogging.com is a free spirited attempt to build a network of different types of Pakistan - focused blogs. See the Categories below for what we have managed to do so far.
Submit you Pakistani Blog