<commit_before># Installing NeuroNER on Mac OS X


You need to install Python 3.5 (e.g., from https://www.python.org/ftp/python/3.5.3/python-3.5.3-macosx10.6.pkg)

To install TensorFlow:
```
# For CPU support (no GPU support):
sudo pip3 install tensorflow
# For GPU support:
sudo pip3 install tensorflow-gpu
```

Note that for GPU support, [GPU requirements for Tensorflow](https://www.tensorflow.org/install/install_mac) must be satisfied.

To install a few more Python packages which NeuroNER depends on:

```
sudo pip3 install -U networkx matplotlib scikit-learn scipy spacy pycorenlp
python3.5 -m spacy download en
```

To install BRAT (optional, you just need it if you want to easily change or view the annotations):

```
mkdir brat
cd brat
wget http://weaver.nlplab.org/~brat/releases/brat-v1.3_Crunchy_Frog.tar.gz
tar xzf brat-v1.3_Crunchy_Frog.tar.gz
cd brat-v1.3_Crunchy_Frog
./install.sh -u
python standalone.py
```

BRAT should now be accessible through the web browser at [http://127.0.0.1:8001](http://127.0.0.1:8001).<commit_msg>Specify the Python version required to run BRAT<commit_after># Installing NeuroNER on Mac OS X


You need to install Python 3.5 (e.g., from https://www.python.org/ftp/python/3.5.3/python-3.5.3-macosx10.6.pkg)

To install TensorFlow:
```
# For CPU support (no GPU support):
sudo pip3 install tensorflow
# For GPU support:
sudo pip3 install tensorflow-gpu
```

Note that for GPU support, [GPU requirements for Tensorflow](https://www.tensorflow.org/install/install_mac) must be satisfied.

To install a few more Python packages which NeuroNER depends on:

```
sudo pip3 install -U networkx matplotlib scikit-learn scipy spacy pycorenlp
python3.5 -m spacy download en
```

To install BRAT (optional, you just need it if you want to easily create, change or view the annotations):

```
mkdir brat
cd brat
wget http://weaver.nlplab.org/~brat/releases/brat-v1.3_Crunchy_Frog.tar.gz
tar xzf brat-v1.3_Crunchy_Frog.tar.gz
cd brat-v1.3_Crunchy_Frog
./install.sh -u

# To run BRAT (requires Python 2.5, 2.6 or 2.7):
python standalone.py
```

BRAT should now be accessible through the web browser at [http://127.0.0.1:8001](http://127.0.0.1:8001).
{'fraction_non_alphanumeric': 0.11238532110091744, 'fraction_numerical': 0.04128440366972477, 'mean_word_length': 4.205250596658711, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6460167', 'n_tokens_mistral': 830, 'n_tokens_neox': 767, 'n_words': 252}