Skip to content

Commit

Permalink
Fixed subject names + utf
Browse files Browse the repository at this point in the history
  • Loading branch information
alexchernykh committed Feb 1, 2021
1 parent 1898ed8 commit ea15a3b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
7 changes: 4 additions & 3 deletions recommendation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,17 @@ def process_user(user_query: Dict[str, List[int]], df: pd.DataFrame, amount_to_r
sorted_similar_subjects[:amount_to_recommend]]

recommended_subjects_frame = df.iloc[list_recommended_indexes].reset_index(drop=True)
recommend_json = recommended_subjects_frame.to_json(orient="index")

recommend_json_with_slashes = json.dumps(json.loads(recommend_json))
recommend_json = recommended_subjects_frame.to_json(orient="index", force_ascii=False)

recommend_json_with_slashes = json.dumps(json.loads(recommend_json),ensure_ascii=False).encode('utf8')
return recommend_json_with_slashes

@app.route('/recommend', methods=['POST'])
@cross_origin()
def main():
# subjects.csv contains the annotated data based on which will be created a similarity index
df = pd.read_csv('subjects.csv', sep=";")
df = pd.read_csv('subjects.csv', sep=";",encoding='utf8')
data = request.get_json()
user_query = {'Software engineering': [int(data.get('SOFTWARE'))],
'AI': [int(data.get('AI'))],
Expand Down
34 changes: 17 additions & 17 deletions subjects.csv
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
Course name;Link;sws;german;english;Komplexpraktikum;Seminar;Vorlesung;Software engineering;AI;Low-level;Security;Web;Theoretical;Sommersemester;Wintersemester
Hauptseminar Betriebssysteme;https://tu-dresden.de/inf/os/studium/praktika-seminare/hauptseminar;2;1;0;0;1;0;0;0;1;0;0;0;1;1
Komplexpraktikum Mensch-Computer Interaktion;https://tu-dresden.de/ing/informatik/ai/mci/studium/lehrveranstaltungen/komplexpraktikum-mensch-computer-interaktion;4;1;0;1;0;0;1;0;0;0;0;0;1;1
Hauptseminar Datenbanken;https://wwwdb.inf.tu-dresden.de/study/teaching/summer-term-2020/hauptseminar-datenbanken/;2;1;1;0;1;0;1;1;1;0;0;0;1;1
Seminar on Privacy;https://tu-dresden.de/ing/informatik/sya/ps/studium/seminars/ps-sic/?set_language=de;2;1;0;0;1;0;0;0;1;1;0;0;1;1
Seminar Natural Language Processing II;https://www.orchid.inf.tu-dresden.de/teaching/2020ws/seminar/;2;1;0;0;1;0;0;1;0;0;0;1;1;1
Hauptseminar Service and Cloud Computing;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=en&lv_id=55;2;1;1;0;1;0;1;0;0;1;1;0;1;1
Practical Course adaptive dynamic systems;https://tu-dresden.de/ing/informatik/ti/ads/studium/winter/forschungsprojekt;8;1;1;1;0;0;1;0;1;0;0;0;0;1
Komplexpraktikum Computer- und robotergest�tzte Chirurgie;https://www.nct-dresden.de/forschung/departments-and-groups/department-for-translational-surgical-oncology/teaching.html;4;1;1;1;0;0;0;1;0;0;0;0;1;1
Komplexpraktikum Audio Interfaces;https://tu-dresden.de/ing/informatik/smt/mg/studium/lehrveranstaltungen;4;1;0;1;0;0;0;0;0;0;1;0;1;0
Course name;Link;sws;german;english;Komplexpraktikum;Seminar;Vorlesung;Software engineering;AI;Low-level;Security;Web;Theoretical;Sommersemester;Wintersemester
Betriebssysteme;https://tu-dresden.de/inf/os/studium/praktika-seminare/hauptseminar;2;1;0;0;1;0;0;0;1;0;0;0;1;1
Mensch-Computer Interaktion;https://tu-dresden.de/ing/informatik/ai/mci/studium/lehrveranstaltungen/komplexpraktikum-mensch-computer-interaktion;4;1;0;1;0;0;1;0;0;0;0;0;1;1
Datenbanken;https://wwwdb.inf.tu-dresden.de/study/teaching/summer-term-2020/hauptseminar-datenbanken/;2;1;1;0;1;0;1;1;1;0;0;0;1;1
Privacy;https://tu-dresden.de/ing/informatik/sya/ps/studium/seminars/ps-sic/?set_language=de;2;1;0;0;1;0;0;0;1;1;0;0;1;1
Natural Language Processing II;https://www.orchid.inf.tu-dresden.de/teaching/2020ws/seminar/;2;1;0;0;1;0;0;1;0;0;0;1;1;1
Service and Cloud Computing;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=en&lv_id=55;2;1;1;0;1;0;1;0;0;1;1;0;1;1
Adaptive dynamic systems;https://tu-dresden.de/ing/informatik/ti/ads/studium/winter/forschungsprojekt;8;1;1;1;0;0;1;0;1;0;0;0;0;1
Computer- und robotergestützte Chirurgie;https://www.nct-dresden.de/forschung/departments-and-groups/department-for-translational-surgical-oncology/teaching.html;4;1;1;1;0;0;0;1;0;0;0;0;1;1
Audio Interfaces;https://tu-dresden.de/ing/informatik/smt/mg/studium/lehrveranstaltungen;4;1;0;1;0;0;0;0;0;0;1;0;1;0
Forschungsprojekt Computational Logic;https://iccl.inf.tu-dresden.de/web/Lehrveranstaltungen;8;1;1;1;0;0;0;0;0;0;0;1;1;0
Advanced Practical Course Cryptography and Security;https://tu-dresden.de/ing/informatik/sya/ps/studium/seminars/kp-crypto;4;1;1;1;0;0;0;0;1;1;0;0;1;1
Komplexpraktikum Mobile and Ubiquitous Computing;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=de&lv_id=37;4;1;1;1;0;0;1;0;0;0;1;0;1;1
Cryptography and Security;https://tu-dresden.de/ing/informatik/sya/ps/studium/seminars/kp-crypto;4;1;1;1;0;0;0;0;1;1;0;0;1;1
Mobile and Ubiquitous Computing;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=de&lv_id=37;4;1;1;1;0;0;1;0;0;0;1;0;1;1
Computer Vision I;https://mlcv.inf.tu-dresden.de/courses/wt20/cv1/index.html;4;0;1;0;0;1;0;1;0;0;0;0;0;1
Computer Vision II;https://mlcv.inf.tu-dresden.de/courses/st20/cv2/index.html;4;0;1;0;0;1;0;1;0;0;0;0;1;0
Machine Learning I;https://mlcv.inf.tu-dresden.de/courses/wt20/ml1/index.html;4;0;1;0;0;1;0;1;0;0;0;0;0;1
Machine Learning 2;https://mlcv.inf.tu-dresden.de/courses/st20/ml2/index.html;4;0;1;0;0;1;0;1;0;0;0;0;1;0
Problem Solving and Search in AI;https://iccl.inf.tu-dresden.de/web/Problem_Solving_and_Search_in_Artificial_Intelligence_(SS2020);6;0;1;0;0;1;0;1;0;0;0;1;1;0
Compilerbau;https://cfaed.tu-dresden.de/cc-teaching;4;0;1;0;0;1;0;0;1;1;0;1;0;1
Compilerbau;https://cfaed.tu-dresden.de/cc-teaching;4;1;0;0;0;1;0;0;1;1;0;1;1;0
Internet and Web Applications;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=de&lv_id=50;4;0;1;0;0;1;1;0;0;1;1;0;1;0
Internet and Web Applications;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=de&lv_id=50;4;0;1;0;0;1;1;0;0;1;1;0;1;0
Cryptography and Cryptanalysis;https://tu-dresden.de/ing/informatik/sya/ps/studium/lectures/crypto;4;1;0;0;0;1;0;0;0;1;0;0;1;0
Scalable Data Management;https://wwwdb.inf.tu-dresden.de/study/teaching/summer-term-2020/scalable-data-processing-concepts/;4;1;0;0;0;1;1;0;0;0;0;0;1;0
Schedulingtheorie;https://tu-dresden.de/ing/informatik/sya/professur-fuer-betriebssysteme/studium/vorlesungen/schedulingtheorie;2;1;0;0;0;1;0;0;1;0;0;0;1;0
Security and Cryptography II;https://tu-dresden.de/ing/informatik/sya/ps/studium/lectures/sac-ii?set_language=en;4;0;1;0;0;1;0;0;0;1;0;0;1;0
Information Retrieval;https://wwwdb.inf.tu-dresden.de/study/teaching/winter-term-2020-21/information-retrieval/;4;1;0;0;0;1;1;1;0;0;0;0;0;1
Microkernel-Based Operating Systems;https://tu-dresden.de/ing/informatik/sya/professur-fuer-betriebssysteme/studium/vorlesungen/mos;3;1;0;0;0;1;0;0;1;1;0;0;0;1
Programming for Data Science;https://wwwdb.inf.tu-dresden.de/study/teaching/winter-term-2020-21/programming-for-data-science/;4;1;0;1;0;1;1;1;0;0;0;0;0;1
Service and Cloud Computing;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=en&lv_id=49;4;1;0;0;0;1;1;0;0;0;1;0;0;1
Service and Cloud Computing;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=en&lv_id=49;4;1;0;0;0;1;1;0;0;0;1;0;0;1
Systems Engineering I;https://tu-dresden.de/ing/informatik/sya/se/studium/lehrveranstaltungen/winter-semester/systems_engineering_1;4;0;1;0;0;1;1;0;0;0;1;0;0;1
Systems Engineering II;https://tu-dresden.de/ing/informatik/sya/se/studium/lehrveranstaltungen/winter-semester/systems_engineering_2;4;0;1;0;0;1;1;0;0;0;1;0;0;1
Automata and Logic;https://tu-dresden.de/ing/informatik/thi/lat/studium/lehrveranstaltungen/wintersemester-2020-2021/automata-and-logic;4;0;1;0;0;1;0;0;0;0;0;1;0;1
Introduction to Parsing of Natural Languages;https://www.orchid.inf.tu-dresden.de/teaching/2020ws/smt/;4;1;0;0;0;1;0;1;0;0;0;0;0;1
Knowledge Graphs;https://iccl.inf.tu-dresden.de/web/Knowledge_Graphs_(WS2020/21)/en;4;0;1;0;0;1;0;1;0;0;0;1;0;1
Theory of Weighted Tree Automata;https://www.orchid.inf.tu-dresden.de/teaching/2020ws/wta/;6;1;0;0;0;1;0;1;0;0;0;1;0;1
Computer- und robotergest�tze Chirurgie;https://www.nct-dresden.de/forschung/departments-and-groups/department-for-translational-surgical-oncology/teaching.html#vorlesung-computer--und-robotergestuetzte-chirurgie-informatik--lecture-computer--and-robot-assisted-surgery-informatics;4;1;1;0;0;1;0;1;0;0;0;0;0;1
Computer- und robotergestütze Chirurgie;https://www.nct-dresden.de/forschung/departments-and-groups/department-for-translational-surgical-oncology/teaching.html#vorlesung-computer--und-robotergestuetzte-chirurgie-informatik--lecture-computer--and-robot-assisted-surgery-informatics;4;1;1;0;0;1;0;1;0;0;0;0;0;1
Data Visualization;https://mt.inf.tu-dresden.de/study/teaching/ws_20-21/vis_20-21/;4;0;1;0;0;1;1;0;1;1;0;0;0;1
Highly parallel programming of GPU;https://tu-dresden.de/ing/informatik/ti/professur-fuer-rechnerarchitektur/studium/lehrveranstaltungen/vorlesungen/vorlesung-hochparallele-programmierung-von-gpus;4;1;1;0;0;1;0;0;1;0;0;0;0;1
Computer Graphics I;https://tu-dresden.de/ing/informatik/smt/cgv/studium/lehrveranstaltungen/ws2021/cg1;4;0;1;0;0;1;1;0;0;0;0;1;0;1
Barrierefreie Dokumente;https://tu-dresden.de/ing/informatik/ai/mci/studium/lehrveranstaltungen/barrierefreie-dokumente;4;1;0;0;0;1;0;0;0;0;1;0;0;1
Internet of Things in Automation;https://tu-dresden.de/ing/informatik/ai/professur-fuer-prozesskommunikation/studium/lehrveranstaltungen/wintersemester;4;1;0;0;0;1;1;0;0;0;0;0;0;1
Internet of Things in Automation;https://tu-dresden.de/ing/informatik/ai/professur-fuer-prozesskommunikation/studium/lehrveranstaltungen/wintersemester;4;1;0;0;0;1;1;0;0;0;0;0;0;1
Wireless Sensor Networks;https://tu-dresden.de/ing/informatik/sya/professur-fuer-rechnernetze/studium/lehrveranstaltungen/lehrveranstaltungsdetails?ln=en&lv_id=45;4;0;1;0;0;1;0;0;1;1;0;0;1;0
Database Theory;https://iccl.inf.tu-dresden.de/web/Database_Theory_(SS2020);6;0;1;0;0;1;0;0;0;0;0;1;1;0
Parsing von nat�rlichen Sprachen;https://www.orchid.inf.tu-dresden.de/teaching/2020ss/pnl/;4;1;0;0;0;1;0;1;0;0;0;1;1;0
Parsing von natürlichen Sprachen;https://www.orchid.inf.tu-dresden.de/teaching/2020ss/pnl/;4;1;0;0;0;1;0;1;0;0;0;1;1;0
Computer Graphics 2;https://tu-dresden.de/ing/informatik/smt/cgv/studium/lehrveranstaltungen/ss2020/cg2;4;0;1;0;0;1;1;0;0;0;0;0;1;0
Scientific Visualization;https://tu-dresden.de/ing/informatik/smt/cgv/studium/lehrveranstaltungen/ss2020/scivis;4;0;1;0;0;1;0;0;0;0;0;1;1;0

0 comments on commit ea15a3b

Please sign in to comment.