<commit_before>Gaia 2
======

ABOUT
-----

Gaia is a C++ library with python bindings which implements similarity measures and classiﬁcations on the results of audio analysis, and generates classiﬁcation models that Essentia can use to compute high-level description of music. 

Licence: [Affero GPLv3 license](http://www.gnu.org/licenses/agpl.html)

Documentation: http://essentia.upf.edu/documentation/gaia 


Dependencies:
  
  * Qt >= 4.5
  * libYAML >= 0.1.1
  * Python >= 2.4
  * SWIG >= 1.3.31


INSTALL
-------

## Linux

- Install dependencies (Ubuntu/Debian)
   ```
   $ apt-get install build-essential libqt4-dev libyaml-dev swig python-dev pkg-config
   ```

   Note that Gaia build will fail if you are using swig 3.0.8. Install either a previous or later version. You will encounter this problem if you are using swig package distributed with Ubuntu 16.04. In this case install the newest swig version from source (https://github.com/swig/swig).


- Online help for WAF (build system)
   ```
   $ ./waf --help
   ```
   
- Configure with the desired options
    ```
    $ ./waf configure [--with-python-bindings] [--with-stlfacade] [--with-asserts] [--with-cyclops]
    ```    
    NOTE: in order to link Essentia library with Gaia, do not use --with-stlfacade option

- Compile libgaia.a:
    ```
    $ ./waf
    ```
    
- Install (to install system-wide you might need ```sudo```)
    ```
    $ ./waf install [--destdir=/where/ever/]
    ```
    
- Build documentation (optional), it will be located at build/doc/ folder
    ```
    $ ./python src/doc/regenerate_docstring.py
    ```

## MacOS X

### Build from command-line using Homebrew (recommended):
- Install Qt4:
    ```
    brew install cartr/qt4/qt
    ```

- Install homebrew tap:
    ```
    brew tap MTG/essentia
    ```

- Build Gaia (this will also install all the dependencies)

    ```
    brew install gaia --HEAD
    ```

### Build from command-line:

- Install python, qt libraries 4.8, libYAML and swig dependencies using homebrew:	
    ```
    $ brew install python --framework
    $ brew install swig libyaml qt
    ```

- Install pyyaml pip package in case use want to build with python bindings:
    ```
    $ pip install pyyaml
    ```
    
- Configure and build similarly to Linux (see above).


### Build with QtCreator (alternative):

(Gaia2lib)

- install qt libraries 4.8 (including debug libraries) and QtCreator from http://qt-project.org/downloads

- install libYAML and swig dependencies using homebrew (we assume you already have a python 
  installation, otherwise you can also install it using homebrew):
    ```
    $ brew install swig
    $ brew install libyaml
    ```

- use QtCreator to open the project file 'Gaia2lib.pro' in packaging/darwin/Gaia2lib/

- compile the project (you will probably need to configure QtCreator to work with your Qt 
  installation and also to set up the build folder for the project)
<commit_msg>Add notes to install Qt4 (continued)<commit_after>Gaia 2
======

ABOUT
-----

Gaia is a C++ library with python bindings which implements similarity measures and classiﬁcations on the results of audio analysis, and generates classiﬁcation models that Essentia can use to compute high-level description of music. 

Licence: [Affero GPLv3 license](http://www.gnu.org/licenses/agpl.html)

Documentation: http://essentia.upf.edu/documentation/gaia 


Dependencies:
  
  * Qt >= 4.5
  * libYAML >= 0.1.1
  * Python >= 2.4
  * SWIG >= 1.3.31


INSTALL
-------

## Linux

- Install dependencies (Ubuntu/Debian)
   ```
   $ apt-get install build-essential libqt4-dev libyaml-dev swig python-dev pkg-config
   ```

   Note that Gaia build will fail if you are using swig 3.0.8. Install either a previous or later version. You will encounter this problem if you are using swig package distributed with Ubuntu 16.04. In this case install the newest swig version from source (https://github.com/swig/swig).


- Online help for WAF (build system)
   ```
   $ ./waf --help
   ```
   
- Configure with the desired options
    ```
    $ ./waf configure [--with-python-bindings] [--with-stlfacade] [--with-asserts] [--with-cyclops]
    ```    
    NOTE: in order to link Essentia library with Gaia, do not use --with-stlfacade option

- Compile libgaia.a:
    ```
    $ ./waf
    ```
    
- Install (to install system-wide you might need ```sudo```)
    ```
    $ ./waf install [--destdir=/where/ever/]
    ```
    
- Build documentation (optional), it will be located at build/doc/ folder
    ```
    $ ./python src/doc/regenerate_docstring.py
    ```

## MacOS X

### Build from command-line using Homebrew (recommended):
- Install Qt4:
    ```
    brew install cartr/qt4/qt
    ```

- Install homebrew tap:
    ```
    brew tap MTG/essentia
    ```

- Build Gaia (this will also install all the dependencies)

    ```
    brew install gaia --HEAD
    ```

### Build from command-line:

- Install python, qt libraries 4.8, libYAML and swig dependencies using homebrew:	
    ```
    $ brew install python --framework
    $ brew install swig libyaml cartr/qt4/qt
    ```

- Install pyyaml pip package in case use want to build with python bindings:
    ```
    $ pip install pyyaml
    ```
    
- Configure and build similarly to Linux (see above).


### Build with QtCreator (alternative):

(Gaia2lib)

- install qt libraries 4.8 (including debug libraries) and QtCreator from http://qt-project.org/downloads

- install libYAML and swig dependencies using homebrew (we assume you already have a python 
  installation, otherwise you can also install it using homebrew):
    ```
    $ brew install swig
    $ brew install libyaml
    ```

- use QtCreator to open the project file 'Gaia2lib.pro' in packaging/darwin/Gaia2lib/

- compile the project (you will probably need to configure QtCreator to work with your Qt 
  installation and also to set up the build folder for the project)

{'fraction_non_alphanumeric': 0.10909706928680332, 'fraction_numerical': 0.010503133999661188, 'mean_word_length': 2.909933774834437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, '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': '2782752', 'n_tokens_mistral': 1867, 'n_tokens_neox': 1778, 'n_words': 665}