-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainTask.py
35 lines (22 loc) · 850 Bytes
/
mainTask.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys
from recommendationModule.recommendation import RecommendationModule
from dataModule.data import DataModule
from user import User
from config import Config
class MainTask :
_recommendationModule = None
def __init__(self, id, lng, lat, dist) :
# 1. Data retrieval module
dataModule = DataModule()
# 2. Recommendations Module
self._recommendationModule = RecommendationModule(dataModule)
# User
#user = User(Config['userId'], Config['lng'],
# Config['lat'], Config['maxDist'])
user = User(id, lng, lat, dist)
dataModule.setUser(user)
dataModule.buildUserFeatures()
self._recommendationModule.setUser(user)
def doRecommendation(self) :
reco = self._recommendationModule.doRecommendation()
return(reco)