open-city/dedupe — pull request #114 by mekarpeles (2013-04-09 04:19:49+00:00)
Title: Update predicates.py

1. Spelling on docstring for sameSevenCharStartPredicate, "characters"
2. same"N"CharStartPredicate results in substantial redundancy. Consider deprecating in favor of: initials
3. common"N"Gram -> ngrams

Questions: How should spaces be regarded within a 'field' for the ngrams function?

Issues:
- nearIntegersPredicate(field) disregards negative integers indicated by "-" (other than -1 in the case of 0)

Consider also:

def ingrams(field, n):
"""produces an iterator over ngrams generated from a sequence of items

see: http://nltk.googlecode.com/svn/trunk/doc/api/nltk.util-module.html#ingrams
"""
...