text classifjcation using pytorch
play

Text Classifjcation using PyTorch Jindich Libovick November 28, - PowerPoint PPT Presentation

Text Classifjcation using PyTorch Jindich Libovick November 28, 2018 B4M36NLP Introduction to Natural Language Processing Charles University Faculty of Mathematics and Physics Institute of Formal and Applied Linguistics unless otherwise


  1. Text Classifjcation using PyTorch Jindřich Libovický November 28, 2018 B4M36NLP Introduction to Natural Language Processing Charles University Faculty of Mathematics and Physics Institute of Formal and Applied Linguistics unless otherwise stated

  2. Sentiment Classifjcation Given a short text, decide whether it makes a positive , negative or neural statement. Text Classifjcation using PyTorch 1/4

  3. Prepare Python Environment virtualenv -p python3 env source env/bin/activate pip3 install torch torchvision torchtext pip3 install jupyter pip3 install spacy python -m spacy download en Text Classifjcation using PyTorch 2/4 • create a new environment • activate the environment • install PyTorch, Spacy and Jupyter

  4. Alternatively using Anaconda wget https://repo.continuum.io/archive/Anaconda2-5.3.1-Linux-x86_64.sh bash Anaconda3-4.2.0-Linux-x86_64.sh export PATH=$PATH:$HOME/anaconda3/bin conda create -n pytorch python=3.6 anaconda source activate pytorch pip3 install torch torchvision torchtext pip3 install jupyter pip3 install spacy python -m spacy download en Text Classifjcation using PyTorch 3/4 • download and install Anaconda • create a new environment • activate the environment • install PyTorch, Spacy and Jupyter

  5. Download the Lab Notebook wget http://ufallab.ms.mff.cuni.cz/l̃ibovicky/ctu_lab_1.ipynb) jupyter notebook Text Classifjcation using PyTorch 4/4 • download the notebook • run jupyter in the same directory

Recommend


More recommend