Subversion Repositories SmartDukaan

Rev

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

Rev 2547 Rev 2556
Line 24... Line 24...
24
                        type_score = 10.0
24
                        type_score = 10.0
25
                    else:
25
                    else:
26
                        type_score = 9.0
26
                        type_score = 9.0
27
        
27
        
28
        if features.has_key("Navigation") :
28
        if features.has_key("Navigation") :
29
            navigation = features.get("Navigation")
29
            type = features.get("Navigation")
30
            if len(navigation) > 0 :
30
            if len(type) > 0 :
31
                type = navigation[0]
-
 
32
                if type == "5-way key" :
31
                if "5-way key" in type:
33
                    navigation_score = 4
32
                    navigation_score = 4
34
                elif type == "Trackpad" :
-
 
35
                    navigation_score = 6
-
 
36
                elif type == "Optical Trackpad" :
-
 
37
                    navigation_score = 9
-
 
38
                if type == "Touch Navigation" :
-
 
39
                    navigation_score = 8
-
 
40
                if type == "Trackball" :
33
                if "Trackball"  in type:
41
                    navigation_score = 5
34
                    navigation_score = 5
42
                if type == "Optical Joystick" :
35
                if "Optical joystick" in type:
43
                    navigation_score = 5
36
                    navigation_score = 5
44
                if type == "Optical Navikey" :
37
                if "Optical navi key" in type:
45
                    navigation_score = 5
38
                    navigation_score = 5
-
 
39
                if "Trackpad" in type:
-
 
40
                    navigation_score = 6
-
 
41
                if "Optical trackpad" in type:
-
 
42
                    navigation_score = 9
-
 
43
                if "Touch navigation" in type :
-
 
44
                    navigation_score = 8
-
 
45
                    if "Trackpad" in type:
-
 
46
                        navigation_score = 9.5
-
 
47
                    if "Optical trackpad" in type:
-
 
48
                        navigation_score = 10
-
 
49
 
46
                    
50
                    
47
        if features.has_key("Touchscreen Type") :
51
        if features.has_key("Touchscreen type") :
48
            touch_screen_type = features.get("Touchscreen Type")
52
            touch_screen_type = features.get("Touchscreen type")
49
            if len(touch_screen_type) > 0 :
53
            if len(touch_screen_type) > 0 :
50
                touch_screen_type = touch_screen_type[0]
54
                touch_screen_type = touch_screen_type[0]
51
                if touch_screen_type == "Capacitive" :
55
                if touch_screen_type == "Capacitive touchscreen" :
52
                    touch_screen_score = 9
56
                    touch_screen_score = 9
53
                elif touch_screen_type == "Resistive" :
57
                elif touch_screen_type == "Resistive touchscreen" :
54
                    touch_screen_score = 6
58
                    touch_screen_score = 6
55
    
59
    
56
    print "type_score" + str(type_score)
60
    print "type_score" + str(type_score)
57
    print "navigation_score" + str(navigation_score)
61
    print "navigation_score" + str(navigation_score)
58
    print "touch_screen_score" + str(touch_screen_score)
62
    print "touch_screen_score" + str(touch_screen_score)