Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4036 varun.gupt 1
import utils
2
 
3
def getscore(struct):
4
 
5
    score = 0.0
6
 
7
    if struct.has_key('features'):
8
        features = struct.get('features')
9
        features_count = len(features)
10
        score = 10.0 if features_count >= 10 else features_count * 1.0
11
 
12
    return score
13
 
14
 
15
print "expSlide=" + `expSlide`
16
 
17
struct = utils.contentModel2Struct(expSlide, categoryObj)
18
print "struct=" + `struct`
19
 
20
score = getscore(struct)