Skip to content

Instantly share code, notes, and snippets.

View lionaruc's full-sized avatar
🏠
Working from home

Lionel Arucy lionaruc

🏠
Working from home
  • Arucy Enterprises
  • Nairobi
View GitHub Profile
@lionaruc
lionaruc / autocorrrect.py
Created July 24, 2017 23:14 — forked from bgreenlee/autocorrrect.py
Simple ngram autocorrect #python #algorithms
import os.path
import collections
from operator import itemgetter
WORDFILE = '/usr/share/dict/words'
class Autocorrect(object):
"""
Very simplistic implementation of autocorrect using ngrams.
"""
<!-- VAST document with one InLine ad and one Wrapper ad-->
<VAST version="2.0">
<Ad id="601364">
<InLine>
<AdSystem>Acudeo Compatible</AdSystem>
<AdTitle>VAST 2.0 Instream Test 1</AdTitle>
<Description>VAST 2.0 Instream Test 1</Description>
<Error>http://myErrorURL/error</Error>
<Impression>