<commit_before># Installing the pyCNN module.

First, get CNN and Eigen:

```bash
mkdir cnn
cd cnn
git clone https://github.com/yoavg/cnn.git
hg clone https://bitbucket.org/eigen/eigen/
```

Compile CNN.
Note that we are currently relying on the CNN code that is in the
`pycnn` branch (it has a few modifications needed for pyCNN to work), 
but at some point this will be merged into cnn proper.
(modify the code below to point to the correct boost location)

```bash
cd cnn
git checkout pycnn # branch
mkdir build
cd build
cmake .. -DEIGEN3_INCLUDE_DIR=../eigen -DBOOST_ROOT=/home/yogo/.local/boost -DBoost_NO_BOOST_CMAKE=ON
make -j 2
```

Now that CNN is compiled, we need to compile the pycnn module.
This requires having cython installed.
If you don't have cython, it can be installed with either `pip install cython` or better yet `conda install cython`.

```bash
pip2 install cython --user
cd ../pycnn
make
make install<commit_msg>updated instructions.<commit_after># Installing the pyCNN module.

First, get CNN and Eigen:

```bash
mkdir cnn
cd cnn
git clone https://github.com/yoavg/cnn.git
hg clone https://bitbucket.org/eigen/eigen/
```

Compile CNN.
Note that we are currently relying on the CNN code that is in the
`pycnn` branch (it has a few modifications needed for pyCNN to work), 
but at some point this will be merged into cnn proper.
(modify the code below to point to the correct boost location)

```bash
cd cnn
git checkout pycnn # branch
mkdir build
cd build
cmake .. -DEIGEN3_INCLUDE_DIR=../eigen -DBOOST_ROOT=/home/yogo/boost/boost_1_58_0 -DBoost_NO_BOOST_CMAKE=ON
make -j 2
```

Now that CNN is compiled, we need to compile the pycnn module.
This requires having cython installed.
If you don't have cython, it can be installed with either `pip install cython` or better yet `conda install cython`.

```bash
pip2 install cython --user
cd ../pycnn
make
make install
{'fraction_non_alphanumeric': 0.0826271186440678, 'fraction_numerical': 0.005296610169491525, 'mean_word_length': 4.133152173913044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5640052', 'n_tokens_mistral': 653, 'n_tokens_neox': 593, 'n_words': 272}