Subversion Repositories SmartDukaan

Rev

Rev 2663 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2663 Rev 3314
Line 26... Line 26...
26
            weight = features.get("Weight")
26
            weight = features.get("Weight")
27
            
27
            
28
            if len(weight) > 0 :
28
            if len(weight) > 0 :
29
                weight = float(weight[0])
29
                weight = float(weight[0])
30
                print "weight=" + `weight`
30
                print "weight=" + `weight`
-
 
31
 
-
 
32
                if weight == -1:
31
                
33
                    weight = 90 
-
 
34
                                    
32
                if weight > max_weight :
35
                if weight > max_weight :
33
                    weight_score = 0
36
                    weight_score = 0
34
                
37
                
35
                elif weight <= min_weight :
38
                elif weight <= min_weight :
36
                    weight_score = 10
39
                    weight_score = 10
Line 43... Line 46...
43
            size = features.get("Size")
46
            size = features.get("Size")
44
            
47
            
45
            if len(size) > 2 :
48
            if len(size) > 2 :
46
                thickness = float(size[2])
49
                thickness = float(size[2])
47
                print "thickness=" + `thickness`
50
                print "thickness=" + `thickness`
-
 
51
 
-
 
52
                if thickness == -1 :
-
 
53
                    thickness = 12
48
                
54
                    
49
                if thickness <= min_thickness :
55
                if thickness <= min_thickness :
50
                    thickness_score = 10
56
                    thickness_score = 10
51
                
57
                
52
                elif thickness > max_thickness :
58
                elif thickness > max_thickness :
53
                    thickness_score = 0
59
                    thickness_score = 0