Social Recommendation System
Social Recommendation System is a prototype of recommendation for the website Gokera. It is implemented on a website, with the framework Django. The purpose of the project is not the website, so it’s normal if the quality of the website is poor.
The purpose is to propose events to an user with an hybrid recommendation system. The works is split in few parts:
1) Login facebook and Graph request to obtain some useful information about the user
2) Texts analysis of all the events
3) Recommendation, hybrid feature-weighted system.
For more information, please consult the report.
Before downloading this project, you should have some requirements. These are all I’ve used with this project, on windows. For other operating system, they should be similar.
For windows, what I’ve used :
- Python 2.7.5 x64 → http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi
- Pip 1.4.1 x64 → http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip
- SetupTools 1.6 x64 → http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools
- Django-nonrel 1.3 → https://github.com/django-nonrel/django/tree/nonrel-1.3
- Django Toolbox 1.3 → https://github.com/django-nonrel/djangotoolbox/tree/toolbox-1.3
- Django MongoDB Engine 1.3 → https://github.com/django-nonrel/mongodb-engine/tree/mongodb-engine-1.3
- MongoDB x64 → http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2.4.6.zip
- Facebook Graph API→ https://github.com/jmg/pyfb
- Interaction with Facebook Graph → https://github.com/jgorset/facepy
- Guess-language → https://pypi.python.org/pypi/guess-language
- Numpy MLK 1.8 x64 → http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
In a general way, if there is a file like requirements.txt, you should do “pip install -r requirements.txt”.
The version of django used is 1.3.7, installed via Django MongoDB Engine.
The installation of TreeTagger is a little bit tricky. First you have to download the python wrapper here : http://cental.fltr.ucl.ac.be/team/~panchenko/def/treetaggerwrapper.py. Afterwards, you have to copy it in your python folder Lib.Then, you have to create your treetagger folder that’ll contain the binaries and the configuration files. More information can be found here : http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/.
An example is available here : http://www.fabienpoulard.info/post/2011/01/09/Python-et-Tree-Tagger. Be careful with the accent in french. If you want that works, you must precise that the input and the output is utf-8 and when you pass a string, pass it in unicode (u"….") and it’ll work.
For the french version, here an example of treetagger folder. It could be downloaded here : http://isic.lan/dmsf/files/589/download.
Once you’ve downloaded and installed all the requirement, change the path to the template directory into the file settings.py and change all \ to /.
Then you must start mongo (mongod.exe) and you might start mongo interface too (mongo.exe —dbpath path_to_data_folder).
Now, let’s execute the code :
python manage.py shell # Inside the shell : from django.contrib.sites.models import Site s = Site() s.save() s.id
Copy the id into settings.py (SITE_ID)
python manage.py syncdb no
python manage.py runserver
Now start you favorite browser and go to 127.0.0.1:8000 and enjoy it !
This code is distributed under the terms and conditions of the MIT license.