<commit_before># Installation
We recommend a recent unix/linux-based OS. Please check if your desired OS meets the following requirements. If not, we recommend debian (8.5 aka _jessie_ or later) or Ubuntu (16.04 LTS aka _Xenial Xerus_ or later). For better PHP performance we recommend a system with PHP 7.x support such as Ubuntu 16.04. Note: Installation on Windows 10 with PHP 5.6 was also successfully tested, but you will need to adjust the commands in these instructions by yourself to your local Windows version equivalents.

## Requirements
The following packages you should be able to install from your package manager:
- git
- Apache (or any other web server-software, e.g. nginx)
- PHP (`>= 5.6.4`) with the following extensions installed and enabled:
  - memcached (on Windows this will not work -- see later)
  - mbstring
  - php-pgsql
  - php-intl (on Windows, php_intl.dll ships with PHP, so just uncomment the line `;extension=php_intl.dll` in php.ini)
- libapache2-mod-php (on Unix systems)
- [Composer](https://getcomposer.org)
- PostgreSQL (`>= 9.1.0`)
- memcached (extension DLL not available for Windows at the moment, see later)
- Python 3.x (for import/export functionalities)
  - pip
  - rdflib
  - psycopg2
  - getopt
- nodejs
- npm
- bower (run `npm install -g bower` on the command line, **Please note**: on Linux you may have to link your `nodejs` executable to the new command `node`. e.g. `sudo ln -s /usr/bin/nodejs /usr/bin/node`)

## Setup
### Package Installation

1. Install all the required packages. For debian-based/apt systems you can use the following command

    ```bash
    sudo apt-get install git apache2 libapache2-mod-php php composer postgresql php-pgsql php-intl php-memcached php-mbstring memcached python3 python-pip python-rdflib python-psycopg2 nodejs npm
    ```

2. Clone This Repository

    ```bash
    git clone https://github.com/eScienceCenter/ThesauRex
    ```

3. Download Dependencies

    ```bash
    cd ThesauRex
    bower install
    cd lumen
    composer install
    ```

**Please note**: During the `composer install` you might get an error regarding an unsecure installation. To fix this you have to edit your `composer.json` file (only edit this file if you know what you're doing) in the `lumen` folder to disable secure HTTP connections. Add `"secure-http": false` or set `"secure-http": true` to `false` if the line already exists. After editing the `composer.json` you have to re-run `composer` with
```bash<commit_msg>python is no longer required!<commit_after># Installation
We recommend a recent unix/linux-based OS. Please check if your desired OS meets the following requirements. If not, we recommend debian (8.5 aka _jessie_ or later) or Ubuntu (16.04 LTS aka _Xenial Xerus_ or later). For better PHP performance we recommend a system with PHP 7.x support such as Ubuntu 16.04. Note: Installation on Windows 10 with PHP 5.6 was also successfully tested, but you will need to adjust the commands in these instructions by yourself to your local Windows version equivalents.

## Requirements
The following packages you should be able to install from your package manager:
- git
- Apache (or any other web server-software, e.g. nginx)
- PHP (`>= 5.6.4`) with the following extensions installed and enabled:
  - memcached (on Windows this will not work -- see later)
  - mbstring
  - php-pgsql
  - php-intl (on Windows, php_intl.dll ships with PHP, so just uncomment the line `;extension=php_intl.dll` in php.ini)
- libapache2-mod-php (on Unix systems)
- [Composer](https://getcomposer.org)
- PostgreSQL (`>= 9.1.0`)
- memcached (extension DLL not available for Windows at the moment, see later)
- nodejs
- npm
- bower (run `npm install -g bower` on the command line, **Please note**: on Linux you may have to link your `nodejs` executable to the new command `node`. e.g. `sudo ln -s /usr/bin/nodejs /usr/bin/node`)

## Setup
### Package Installation

1. Install all the required packages. For debian-based/apt systems you can use the following command

    ```bash
    sudo apt-get install git apache2 libapache2-mod-php php composer postgresql php-pgsql php-intl php-memcached php-mbstring memcached python3 python-pip python-rdflib python-psycopg2 nodejs npm
    ```

2. Clone This Repository

    ```bash
    git clone https://github.com/eScienceCenter/ThesauRex
    ```

3. Download Dependencies

    ```bash
    cd ThesauRex
    bower install
    cd lumen
    composer install
    ```

**Please note**: During the `composer install` you might get an error regarding an unsecure installation. To fix this you have to edit your `composer.json` file (only edit this file if you know what you're doing) in the `lumen` folder to disable secure HTTP connections. Add `"secure-http": false` or set `"secure-http": true` to `false` if the line already exists. After editing the `composer.json` you have to re-run `composer` with
```bash
{'fraction_non_alphanumeric': 0.08676171079429736, 'fraction_numerical': 0.012219959266802444, 'mean_word_length': 3.7865497076023393, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '553889', 'n_tokens_mistral': 1534, 'n_tokens_neox': 1409, 'n_words': 660}