Ignore:
Timestamp:
Apr 19, 2011, 3:27:02 PM (9 years ago)
Author:
robert@…
Message:
  • Updated a bug on production with org.apache.tools.zip
  • Added tooltips to all icons
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/nl/tno/massSequencing/imports/FuzzySearchService.groovy

    r29 r52  
    1515         */
    1616        static def mostSimilarUnique( patterns, candidates, treshold ) {
     17                println "Patterns: " + patterns.findAll { it };
     18                println "Candidates: " + candidates;
     19               
    1720                def matches = []
    1821               
    1922                // Find the best matching candidate for each pattern
    20                 patterns.each { pattern ->
     23                patterns.findAll { it }.each { pattern ->
    2124                        def topScore = 0
    2225                        def bestFit = null
     
    2427                        candidates.each { candidate ->
    2528                                def score = stringSimilarity(pattern, candidate);
    26                                 if( score >= treshold )
     29                                if( !score.isNaN() && score >= treshold )
    2730                                        matches << [ 'pattern': pattern, 'candidate': candidate, 'score': score ];
    2831                        }
Note: See TracChangeset for help on using the changeset viewer.