<commit_before># Overview
[![GoDoc](https://godoc.org/github.com/Machiel/slugify?status.svg)](https://godoc.org/github.com/Machiel/slugify)
[![Build Status](https://drone.io/github.com/Machiel/slugify/status.png)](https://drone.io/github.com/Machiel/slugify/latest)

Slugify is a small library that turns strings in to slugs.

# License
Slugify is licensed under a MIT license.

# Installation
A simple `go get github.com/Machiel/slugify` should suffice.

# Usage

## Example

	package main

	import (
		"fmt"

		"github.com/Machiel/slugify"
	)

	func main() {
		fmt.Println(slugify.Slugify("Hello, world!"))               // Will print: hello-world
		fmt.Println(slugify.Slugify("💻  I love this computer! 💻 ")) // Will print: i-love-this-computer

		dotSlugifier := slugify.New(slugify.Configuration{
			ReplaceCharacter: '.',
		})

		fmt.Println(dotSlugifier.Slugify("Hello, world!")) // Will print: hello.world

		numericOnlySlugifier := slugify.New(slugify.Configuration{
			IsValidCharacterChecker: func(c uint8) bool {
				if c >= '0' && c <= '9' {
					return true
				}

				return false
			},
		})

		fmt.Println(numericOnlySlugifier.Slugify("3 eggs, 2 spoons of milk")) // Will print: 3-2
	}
<commit_msg>Added Go syntax highlighting to readme<commit_after># Overview
[![GoDoc](https://godoc.org/github.com/Machiel/slugify?status.svg)](https://godoc.org/github.com/Machiel/slugify)
[![Build Status](https://drone.io/github.com/Machiel/slugify/status.png)](https://drone.io/github.com/Machiel/slugify/latest)

Slugify is a small library that turns strings in to slugs.

# License
Slugify is licensed under a MIT license.

# Installation
A simple `go get github.com/Machiel/slugify` should suffice.

# Usage

## Example

```go
package main

import (
	"fmt"

	"github.com/Machiel/slugify"
)

func main() {
	fmt.Println(slugify.Slugify("Hello, world!"))               // Will print: hello-world
	fmt.Println(slugify.Slugify("💻  I love this computer! 💻 ")) // Will print: i-love-this-computer

	dotSlugifier := slugify.New(slugify.Configuration{
		ReplaceCharacter: '.',
	})

	fmt.Println(dotSlugifier.Slugify("Hello, world!")) // Will print: hello.world

	numericOnlySlugifier := slugify.New(slugify.Configuration{
		IsValidCharacterChecker: func(c uint8) bool {
			if c >= '0' && c <= '9' {
				return true
			}

			return false
		},
	})

	fmt.Println(numericOnlySlugifier.Slugify("3 eggs, 2 spoons of milk")) // Will print: 3-2
}
```

{'fraction_non_alphanumeric': 0.15157722244981564, 'fraction_numerical': 0.005735354362965997, 'mean_word_length': 3.8260869565217392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, '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': '5840665', 'n_tokens_mistral': 957, 'n_tokens_neox': 887, 'n_words': 180}