Subversion Repositories SmartDukaan

Rev

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

Rev 323 Rev 1915
Line 3... Line 3...
3
print "expSlide=" + `expSlide`
3
print "expSlide=" + `expSlide`
4
 
4
 
5
struct = utils.contentModel2Struct(expSlide)
5
struct = utils.contentModel2Struct(expSlide)
6
print "struct=" + `struct`
6
print "struct=" + `struct`
7
 
7
 
8
score = 0
8
score = 0.0
9
 
9
 
10
# Types : count <=2 - 4, >2 - 8
10
# Types : count <=2 - 4, >2 - 8
11
 
11
 
12
if struct.has_key("features") :
12
if struct.has_key("features") :
13
    features = struct.get("features")
13
    features = struct.get("features")
14
    
14
    
15
    if features.has_key("Types") :
15
    if features.has_key("Types") :
16
       types = features.get("Types")
16
       types = features.get("Types")
17
       print "types=" + `types`
17
       print "types=" + `types`
18
       
18
       
19
       if len(types) <= 2 :
19
       if "MMS" in types:
-
 
20
           score += 1
-
 
21
                  
-
 
22
       if "Instant messaging" in types:
20
           score += 4
23
           score += 4
21
       
24
       
22
       if len(types) > 2 :
-
 
23
           score +=8
-
 
24
            
-
 
25
25
       if "Email" in types:
-
 
26
           score += 5
-
 
27
           
-
 
28
26
29