<commit_before># Slugifier

[![Build Status](https://secure.travis-ci.org/keyvanakbary/slugifier.svg?branch=master)](http://travis-ci.org/keyvanakbary/slugifier)

Just a simple and clean implementation for creating [slugs](http://en.wikipedia.org/wiki/Semantic_URL#Slug)

## Setup and Configuration
Add the following to your `composer.json` file
```json
{
    "require": {
        "keyvanakbary/slugifier": "*"
    }
}
```

Update the vendor libraries

    curl -s http://getcomposer.org/installer | php
    php composer.phar install

## Usage

```php
<?php

include 'vendor/autoload.php';

$slugifier = new \Slugifier();

echo $slugifier->slugify('This is an awesome slug');
//this-is-an-awesome-slug

echo $slugifier->slugify('Cumpleaños del murciélago');
//cumpleanos-del-murcielago

echo $slugifier->slugify('Wikipedia style', '_');
//wikipedia_style<commit_msg>Update README to version 1.0<commit_after># Slugifier

[![Build Status](https://secure.travis-ci.org/keyvanakbary/slugifier.svg?branch=master)](http://travis-ci.org/keyvanakbary/slugifier)

Just a simple and clean implementation for creating [slugs](http://en.wikipedia.org/wiki/Semantic_URL#Slug).

## Setup and Configuration
Add the following to your `composer.json` file
```json
{
    "require": {
        "keyvanakbary/slugifier": "~1.0"
    }
}
```

Update the vendor libraries

    curl -s http://getcomposer.org/installer | php
    php composer.phar install

## Usage

```php
<?php

include 'vendor/autoload.php';

$slugifier = new \Slugifier();

echo $slugifier->slugify('This is an awesome slug');
//this-is-an-awesome-slug

echo $slugifier->slugify('Cumplea<NAME>');
//cumpleanos-del-murcielago

echo $slugifier->slugify('Wikipedia style', '_');
//wikipedia_style
{'fraction_non_alphanumeric': 0.15583668775158138, 'fraction_numerical': 0.0023001725129384704, 'mean_word_length': 4.576923076923077, 'pattern_counts': {'":': 4, '<': 6, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '5115118', 'n_tokens_mistral': 622, 'n_tokens_neox': 621, 'n_words': 124}