<commit_before># Filterutils
========

Filter tools for Go!<commit_msg>Adding some documentation for the README<commit_after># Filterutils
=============

Filter tools for Go!

## Usage
========
        func Search(n int, f, g func(int) bool) bool

Execute a Binary Search for a specific item in a list matching function g. If the item is
not found, continue the search based on specifications of function f. Return true/false
depending on whether an item is in our data set

        func StringInSortedSlice(a []string, x string) bool

Execute a Binary Search for a specifc string x in a slice a. Return true/false depending
on whether our string x is contained in slice a.

        func Filter(a []string, f func(int) bool) []string

Search over a slice a for all elements satisfying a specific function f. Return a slice
of all strings matching the criteria specified in f.
{'fraction_non_alphanumeric': 0.08, 'fraction_numerical': 0.0, 'mean_word_length': 4.0344827586206895, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2783382', 'n_tokens_mistral': 230, 'n_tokens_neox': 221, 'n_words': 130}