Mercurial > dedupe
view EditDistance.hpp @ 36:2b83559b78db
BUGFIX: batch inserts inserted empty values.
BUGFIX: cutoff limit was not observed at cutoff, but cutoff + 1
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Fri, 07 Sep 2012 13:06:10 +0200 |
| parents | fda70a362ed5 |
| children | f711ddb56ae7 |
line wrap: on
line source
#ifndef EDITDISTANCE_HPP #define EDITDISTANCE_HPP #include "OrderedPair.hpp" #include "DBCache.hpp" #include "UniqueString.hpp" #include <QtCore/QString> #include <QtCore/QMap> #include <QtCore/QHash> #include "ThreadSafeLookup.hpp" class EditDistance { protected: //typedef ThreadSafeLookup<OrderedPair<QString>, int> cacheType; typedef DBCache<OrderedPair<UniqueString>, int, true> cacheType; //typedef QMap<OrderedPair<QString>, int> cacheType; //typedef QHash<OrderedPair<QString>, int> cacheType; public: static int Compute(QString a, QString b, bool removeDiacritics = false); static QString removeDiacritics(QString in); //static cacheType cache; static cacheType* cache; }; #endif //EDITDISTANCE_HPP
