Mercurial > dedupe
comparison EditDistance.hpp @ 42:4c283daa42c7
Optimize diacritics removal.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Sun, 09 Sep 2012 16:09:52 +0200 |
| parents | f711ddb56ae7 |
| children | 7b7e84356b39 |
comparison
equal
deleted
inserted
replaced
| 41:e0898020af08 | 42:4c283daa42c7 |
|---|---|
| 16 typedef DBCache<OrderedPair<UniqueString>, int, true> cacheType; | 16 typedef DBCache<OrderedPair<UniqueString>, int, true> cacheType; |
| 17 //typedef QMap<OrderedPair<QString>, int> cacheType; | 17 //typedef QMap<OrderedPair<QString>, int> cacheType; |
| 18 //typedef QHash<OrderedPair<QString>, int> cacheType; | 18 //typedef QHash<OrderedPair<QString>, int> cacheType; |
| 19 public: | 19 public: |
| 20 static int Compute(QString a, QString b, bool removeDiacritics = false); | 20 static int Compute(QString a, QString b, bool removeDiacritics = false); |
| 21 static QString removeDiacritics(QString in); | 21 static void removeDiacriticsNoCopy(QString& in); |
| 22 static QString removeDiacritics(const QString& in); | |
| 22 | 23 |
| 23 //static cacheType cache; | 24 //static cacheType cache; |
| 24 static cacheType* cache; | 25 static cacheType* cache; |
| 25 }; | 26 }; |
| 26 | 27 |
