Subversion Repositories SmartDukaan

Rev

Rev 73 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 73 Rev 77
Line 1... Line -...
1
import messaging_math as mathmodel
-
 
2
import utils
1
import utils
3
 
2
 
4
print "expSlide=" + `expSlide`
3
print "expSlide=" + `expSlide`
5
 
4
 
6
struct = utils.contentModel2Struct(expSlide)
5
struct = utils.contentModel2Struct(expSlide)
7
print "struct=" + `struct`
6
print "struct=" + `struct`
8
 
7
 
9
score = mathmodel.getscore(struct)
-
 
10
8
score = 0
-
 
9
 
-
 
10
# Types : count <=2 - 4, >2 - 8
-
 
11
 
-
 
12
if struct.has_key("features") :
-
 
13
    features = struct.get("features")
-
 
14
    
-
 
15
    if features.has_key("Types") :
-
 
16
       types = features.get("Types")
-
 
17
       print "types=" + `types`
-
 
18
       
-
 
19
       if len(types) <= 2 :
-
 
20
           score += 4
-
 
21
       
-
 
22
       if len(types) > 2 :
-
 
23
           score +=8
-
 
24
            
-
 
25
11
26