##################################################### #Computational Linguistics 17-18 #DISSECT tutorial #How to: Get ready to play! #sandro.pezzelle@unitn.it ##################################################### #requirements: # 1. a terminal: CTRL+Alt+T # 2. python # 3. 5 minutes #In what follows we will create a virtual environment with #everything set up for our hands-on session :) #the nicest thing of virtual environments is that #they can be removed with sudo rm -r in case you #do not need to work with semantic spaces anymore! #OPEN THE TERMINAL and copy-paste the content of this txt file, #press Enter and wait for the magic happening! #install virtual env cd ~ pip install virtualenv #if that does not work, check if you have pip installed... #sudo apt-get install python-pip python-dev build-essential #sudo pip install --upgrade pip #make a directory called dissect-env cd ~ virtualenv --python=/usr/bin/python2.7 dissect-env #activate virtual environment source dissect-env/bin/activate #open folder cd dissect-env/ #be sure you have NumPy, SciPy, etc. installed! pip install numpy pip install scipy pip install cython pip install sparsesvd #download dissect and install it git clone https://github.com/composes-toolkit/dissect cd dissect #TYPE YOUR SUDO PASSWORD! sudo python setup.py install #you should have DISSECT installed at this point! #now let's install gensim, a useful library for playing with #and building distributional semantics models cd ~ cd dissect-env/ easy_install -U gensim #now you have gensim installed! #Let's download some useful data... mkdir stuff cd stuff/ wget "https://sandropezzelle.github.io/Other/vectors.bin" wget "https://sandropezzelle.github.io/Other/bin-to-pkl.py" #get a .pkl version of the space python2.7 bin-to-pkl.py #if you get ImportError: No module named composes.semantic_space.space #try instead cd ~ cd dissect-env/dissect/src python ../../stuff/bin-to-pkl.py #you're done! :) #####################################################