<commit_before>## Installation for Mac

Sailor is compatible with a variety of operating systems and webservers. On this example, we will use OS X 10.9 Mavericks and Apache 2.4.

### Installing dependencies

Sailor is compatible with both Lua 5.1 and Lua 5.2. OS X 10.9 Mavericks already comes with Apache 2.2 by default, but you can't use Lua scripts on it.

You need to install Lua, luarocks and Apache 2.4.

    brew update
    brew install lua luarocks zlib homebrew/apache/httpd24

After installing those packages, you need to enable `mod_lua` in Apache's configuration file. The file will probably be located at `/usr/local/etc/apache2/2.4/httpd.conf`. Add or uncomment the following directive:

    LoadModule lua_module modules/mod_lua.so

It's also necessary to allow `.htaccess` files. Look for the `AllowOverride` directive in the configuration file and change from `None` (the default) to `All`.

Now, you should restart Apache. You can use the following command for that:

    sudo /usr/local/Cellar/httpd24/2.4.10/bin/apachectl restart

Keep in mind that the specific version of Apache (in this case 2.4.10) might change.

### Installing Sailor

You can either clone it directly from the repository, download the zip containing the master branch or download and install it through LuaRocks. We will go through LuaRocks since it will also download and install almost all the required dependencies, except for luasql-mysql (which is needed if you want to persist your models).
<commit_msg>Update INSTALL_MAC.md<commit_after>## Installation for Mac

Sailor is compatible with a variety of operating systems and webservers. On this example, we will use OS X 10.10 Yosemite and Apache 2.4

### Installing dependencies

Sailor is compatible with both Lua 5.1 and Lua 5.2. 

You need to install Lua, luarocks and Apache 2.4.

    brew update
    brew install lua luarocks zlib 
    
The default apache build however, does not come with Lua module by default.

    brew edit httpd24

Find the list of enabled flags, after `args = %W[`, add `--enable-lua` and save the file.

    brew install httpd24

After installing those packages, you need to enable `mod_lua` in Apache's configuration file. The file will probably be located at `/usr/local/etc/apache2/2.4/httpd.conf`. Add or uncomment the following directive:

    LoadModule lua_module modules/mod_lua.so

It's also necessary to allow `.htaccess` files. Look for the `AllowOverride` directive in the configuration file and change from `None` (the default) to `All`.

Now, you should restart Apache. You can use the following command for that:

    sudo /usr/local/Cellar/httpd24/2.4.12/bin/apachectl restart

Keep in mind that the specific version of Apache (in this case 2.4.12) might change.

### Installing Sailor

You can either clone it directly from the repository, download the zip containing the master branch or download and install it through LuaRocks. We will go through LuaRocks since it will also download and install almost all the required dependencies, except for luasql-mysql (which is needed if you want to persist your models).

{'fraction_non_alphanumeric': 0.05789642972016726, 'fraction_numerical': 0.01929880990672242, 'mean_word_length': 4.024232633279483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7277240', 'n_tokens_mistral': 902, 'n_tokens_neox': 846, 'n_words': 447}