Skip to content

Instantly share code, notes, and snippets.

@mcavdar
Created February 24, 2018 00:04
Show Gist options
  • Save mcavdar/1482fed3bd3327a0e9895e0f9ab28fd0 to your computer and use it in GitHub Desktop.
Save mcavdar/1482fed3bd3327a0e9895e0f9ab28fd0 to your computer and use it in GitHub Desktop.
neuroner
#!/bin/bash
# If you use Ubuntu 14.04, you need to install Python 3.5 (by default Ubuntu 14.04 doesn't have Python 3.5, unlike Ubuntu 16.04):
add-apt-repository -y ppa:fkrull/deadsnakes
apt-get update
apt-get install -y python3.5
wget https://bootstrap.pypa.io/get-pip.py
python3.5 get-pip.py
pip3 install --upgrade pip
pip -V
mv /usr/local/bin/pip /usr/local/bin/pip3
ln -s /usr/local/bin/pip2.7 /usr/local/bin/pip
# To install TensorFlow:
pip3 install tensorflow
# To install a few more packages which NeuroNER depends on:
pip3 install -U networkx matplotlib scikit-learn scipy pycorenlp
# Installing spaCy
apt-get install -y build-essential python3.5-dev
pip3 install -U spacy
python3.5 -m spacy download en
# To install NeuroNER:
wget https://github.com/Franck-Dernoncourt/NeuroNER/archive/master.zip
apt-get install -y unzip
unzip master.zip
mkdir NeuroNER-master/data/word_vectors
cd NeuroNER-master/data/word_vectors
# Download some word embeddings
#wget http://nlp.stanford.edu/data/glove.6B.zip
wget http://neuroner.com/data/word_vectors/glove.6B.100d.zip
unzip glove.6B.100d.zip
# NeuroNER is now ready to run! By default it is configured to train and test on CoNLL-2003. To start the training:
# To use the CPU if you have installed tensorflow, or use the GPU if you have installed tensorflow-gpu:
cd ../../src
python3.5 main.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment