<commit_before>BloomSearch
===========
An example of using a Bloom filter to provide substring searching.

Requirements
------------
* A C++11 compliant compiler
* CMake
* PostgreSQL
* Libpqxx

Setup Database
--------------
	$> sudo -u postgres createuser -DRS $USER
	$> sudo -u postgres createdb -O $USER
	$> psql
	=> create table users(first varchar(50), first_bloom bit(256), last varchar(50), last_bloom bit(256));

Build Code
----------
	$> mdkir build && cd build
	$> cmake ..
	$> make

Populate Database
-----------------
Names can be inserted individually by using the `insert` program. One name per line.

	$> ./insert

You can also utilize a list of sample names.

	$> cat ../sampleNames.txt | ./insert
<commit_msg>Added link to blog post.<commit_after>BloomSearch
===========
An example of using a Bloom filter to provide substring searching.

I wrote up a walkthrough of the code [here](http://borgernet.com/blog/substring-searching-on-encrypted-data/).

Requirements
------------
* A C++11 compliant compiler
* CMake
* PostgreSQL
* Libpqxx

Setup Database
--------------
	$> sudo -u postgres createuser -DRS $USER
	$> sudo -u postgres createdb -O $USER
	$> psql
	=> create table users(first varchar(50), first_bloom bit(256), last varchar(50), last_bloom bit(256));

Build Code
----------
	$> mdkir build && cd build
	$> cmake ..
	$> make

Populate Database
-----------------
Names can be inserted individually by using the `insert` program. One name per line.

	$> ./insert

You can also utilize a list of sample names.

	$> cat ../sampleNames.txt | ./insert

{'fraction_non_alphanumeric': 0.1760966306420852, 'fraction_numerical': 0.015257469802924348, 'mean_word_length': 2.8673218673218672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '2290447', 'n_tokens_mistral': 512, 'n_tokens_neox': 477, 'n_words': 177}