changeset 29:9729919e589c classical-rdf

* minor fix to text matching
author Chris Cannam
date Mon, 01 Mar 2010 16:55:27 +0000
parents 7d8a6167febb
children 8bed05455706
files common/Objects.cpp
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/common/Objects.cpp	Mon Mar 01 16:51:14 2010 +0000
+++ b/common/Objects.cpp	Mon Mar 01 16:55:27 2010 +0000
@@ -550,11 +550,10 @@
             }
 
             if (!quick) {
-                int minlen = std::min(nel.length(), tel.length());
-                if (minlen > 3) {
+                if (tel.length() > 3) {
                     EditDistance ed(EditDistance::RestrictedTransposition);
                     int dist = calculateThresholdedDistance
-                        (ed, nel.left(minlen), tel.left(minlen));
+                        (ed, nel.left(tel.length()), tel);
                     if (dist >= 0) {
                         component = 0.08 - dist * 0.01;
                         if (sl.contains(nel)) component *= 1.5;