Skip to content

Commit

Permalink
moved old json files to archive folder
Browse files Browse the repository at this point in the history
  • Loading branch information
seekshreyas committed Dec 6, 2013
1 parent d49782d commit 32e63ed
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 10 additions & 4 deletions classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def featureExtractor(app):
# add to check for developer email address
featDict['hasDeveloperWebsite'] = getDeveloperWebsiteState(app)
featDict['installRange'] = getInstallRange(app)

return featDict


Expand Down Expand Up @@ -112,7 +112,7 @@ def getAverageRating(app):
for rating in app['rating']:
total = total + (int(rating[0].strip()) * int(rating[1]))
count = count + int(rating[1])
return total/float(count)
return total/float(count)

def getOneStarRating(app):
for appRatingCount in app['rating']:
Expand Down Expand Up @@ -243,12 +243,18 @@ def main():
userinput = getUserInput()
print userinput

extract = []
for f in listdir(userinput['dir']):
print f
fname = f.split('_')

if fname[-1] == 'all.json':
print userinput['dir'] + f
fextract = fileExtractor(userinput['dir'] + f)
extract.append(fextract)

# extract = fileExtractor(userinput['file'])

# pprint(extract)
pprint(extract)
# features = featureAggregator(extract)
# classifier(extract)

Expand Down

0 comments on commit 32e63ed

Please sign in to comment.