<commit_before># building ReSampler (tested on Ubuntu 16.04)

Building on linux is fairly straightforward and consists of the following 3 steps:

- Build and install fftw library
- Build and install libsndfile library
- Build and install ReSampler

## build environment
~~~
sudo apt-get install build-essential
~~~

## fftw build/install

#sudo apt-get install libfftw3-dev libfftw3-doc

[fftw source](http://www.fftw.org/fftw-3.3.6-pl2.tar.gz)

*extract it to projects folder, and cd to it*
~~~
./configure
make
sudo make install
~~~

## libsndfile build/install

[libsndfile 1.0.28](http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz)

*extract it to projects folder, and cd to it*

~~~
sudo apt install autoconf autogen automake build-essential libasound2-dev \
    libflac-dev libogg-dev libtool libvorbis-dev pkg-config python

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/libsndfile-1.0.28 &&
make
make check
sudo make install
~~~

## building ReSampler

clone this repository to a local directory, and use one of the following command lines to compile:

#### using gcc:

standard 64-bit build:
~~~
g++ -pthread -std=c++11 main.cpp ReSampler.cpp conversioninfo.cpp -lfftw3 -lsndfile -o ReSampler -O3<commit_msg>added commandline to place binary in /usr/local/bin<commit_after># building ReSampler (tested on Ubuntu 16.04)

Building on linux is fairly straightforward and consists of the following 3 steps:

- Build and install fftw library
- Build and install libsndfile library
- Build and install ReSampler

## build environment
~~~
sudo apt-get install build-essential
~~~

## fftw build/install

#sudo apt-get install libfftw3-dev libfftw3-doc

[fftw source](http://www.fftw.org/fftw-3.3.6-pl2.tar.gz)

*extract it to projects folder, and cd to it*
~~~
./configure
make
sudo make install
~~~

## libsndfile build/install

[libsndfile 1.0.28](http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz)

*extract it to projects folder, and cd to it*

~~~
sudo apt install autoconf autogen automake build-essential libasound2-dev \
    libflac-dev libogg-dev libtool libvorbis-dev pkg-config python

./configure --prefix=/usr    \
            --disable-static \
            --docdir=/usr/share/doc/libsndfile-1.0.28 &&
make
make check
sudo make install
~~~

## building ReSampler

clone this repository to a local directory, and use one of the following command lines to compile:

#### using gcc:

standard 64-bit build:
~~~
g++ -pthread -std=c++11 main.cpp ReSampler.cpp conversioninfo.cpp -lfftw3 -lsndfile -o ReSampler -O3
~~~

Note: in practice, you might do something like this:
~~~
sudo g++ -pthread -std=c++11 main.cpp ReSampler.cpp conversioninfo.cpp -lfftw3 -lsndfile -o /usr/local/bin/ReSampler -O3
{'fraction_non_alphanumeric': 0.11457214464733262, 'fraction_numerical': 0.022914428929466525, 'mean_word_length': 3.680067001675042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3547167', 'n_tokens_mistral': 990, 'n_tokens_neox': 915, 'n_words': 296}