<commit_before>Burrows-Wheeler transform
=========================

Skeleton and failing tests for the [Burrows-Wheeler transform](http://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform).

Inspired by [<NAME>'s](https://github.com/tomstuart) lighting talk about the Burrows Wheeler transform at the Brighton Ruby Conference.


## Instructions

Install the bundle:
```bash
bundle
```

Run the specs:
```bash
bundle exec rspec
```

Implement the `encode` and `decode` methods in `lib/bwt.rb` so that the specs pass.<commit_msg>Add note about gotcha on sorting strings.<commit_after>Burrows-Wheeler transform
=========================

Skeleton and failing tests for the [Burrows-Wheeler transform](http://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform).

Inspired by [<NAME>'s](https://github.com/tomstuart) lighting talk about the Burrows Wheeler transform at the Brighton Ruby Conference.

## Instructions

Install the bundle:
```bash
bundle
```

Run the specs:
```bash
bundle exec rspec
```

Implement the `encode` and `decode` methods in `lib/bwt.rb` so that the specs pass.

## Notes

The transform relies on sorting strings. Implementations in other languages may sort strings differently to Ruby and thus produce differnet encodings.

{'fraction_non_alphanumeric': 0.13614649681528662, 'fraction_numerical': 0.007961783439490446, 'mean_word_length': 5.5811518324607325, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7070217', 'n_tokens_mistral': 389, 'n_tokens_neox': 349, 'n_words': 129}