<commit_before># Browl-backend
API for browl.<commit_msg>Updated README.<commit_after># ![Browl](http://i.imgur.com/876ie7H.png) Browl-API [![Build Status](https://travis-ci.org/erkarl/browl-api.png?branch=master)](https://travis-ci.org/erkarl/browl-api)  
Backend for [Browl](https://github.com/erkarl/browl). [Live demo.](http://browl-api.karlranna.com)

## Install 

### Clone, set up virtualenv
Clone this repo, set up and activate a virtualenv:
```console
git clone <EMAIL>:erkarl/browl-api.git
cd browl-api 
virtualenv env
source env/bin/activate
```

### Setup Database
Create a new PostgreSQL user with the username `browl` and password `<PASSWORD>`. Grant it access to `browl` database.

Optionally, if you'd like to use SQLite3 as your DB backend - just change `DATABASES` setting in `../browl-api/browl/settings.py`:
```console
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'db.sqlite3',
    }
}
```

### Setup Dependencies
```console
make install
```

## Run the server 
```console
make server
```
Launch [http://localhost:7000](http://localhost:7000) in your browser.

## Tests 
```console
make test 
```
{'fraction_non_alphanumeric': 0.16552315608919382, 'fraction_numerical': 0.012864493996569469, 'mean_word_length': 4.304545454545455, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, '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': '6550639', 'n_tokens_mistral': 435, 'n_tokens_neox': 406, 'n_words': 103}