A Cython implementation of the affine gap penalty string distance also known as the Smith–Waterman algorithm
Part of the Dedupe.io cloud service and open source toolset for de-duplicating and finding fuzzy matches in your data.
pip install affinegap
import affinegap
d1 = affinegap.affineGapDistance('foo', 'bar')
d2 = affinegap.affineGapDistance('foo', 'bar',
matchWeight = 1,
mismatchWeight = 11,
gapWeight = 10,
spaceWeight = 7,
abbreviation_scale = .125)
d3 = affinegap.normalizedAffineGapDistance('foo', 'bar')
git clone https://github.com/dedupeio/affinegap.git
cd affinegap
pip install -r requirements.txt
cython affinegap/*.pyx
python setup.py develop
pytest
- Forest Gregg, Dedupeio
If something is not behaving intuitively, it is a bug and should be reported. Report it here by creating an issue: https://github.com/dedupeio/affinegap/issues
Help us fix the problem as quickly as possible by following Mozilla's guidelines for reporting bugs.
Your patches are welcome. Here's our suggested workflow:
- Fork the project.
- Make your feature addition or bug fix.
- Send us a pull request with a description of your work. Bonus points for topic branches!
Copyright (c) 2016 Forest Gregg and Dedupeio. Released under the MIT License.