<commit_before>describe('.observe', function(){

	before(function(){
		jumbotron.observe(detections.a)
	})

	it('stored the response of detect in .observations', function(){
		jumbotron.observations.should.containEql(detections.a)
	})

})

describe('.construct', function(){

	before(function(){
		jumbotron.construct()
	})

	it('transformed clients appropriately')
	it('gave a width and height in the correct ratio')

	describe('with more observations', function(){

		it('returned markers obscured by some observations');
		it('corrected erronous observations');

	})

})

describe('recognition', function(){

	// given several images

	it('identified markers')
	it('positioned markers')

})

describe('utils', function(){

	describe('mapToUnit', function(){
		var transform,
			corners = detections.a[0].corners,
			cornerVs = corners.map(function(c){return $V([c.x,c.y,1])});

		before(function(){
			transform = jumbotron.util.mapToUnit(corners)
		});

		it('returned a matrix', function(){
			transform.should.be.an.instanceOf(Matrix);
		})
		it('maps corner 0 to 0,0', function(){
			match_point(transform.x(cornerVs[0]), [0,0], .5)
		})

		it('maps corner 1 to 1,0', function(){
			match_point(transform.x(cornerVs[1]), [1,0], .5)
		})

		it('maps corner 2 to 1,1', function(){
			match_point(transform.x(cornerVs[2]), [1,1], .5)
		})

		it('maps corner 3 to 0,1', function(){
			match_point(transform.x(cornerVs[3]), [0,1], .5)
		})

	})

})


function match_point(vector, array, accuracy){
	vector.elements[0].should.be.approximately(array[0],accuracy)
	vector.elements[1].should.be.approximately(array[1],accuracy)
}<commit_msg>remove corner vectors from test<commit_after>describe('.observe', function(){

	before(function(){
		jumbotron.observe(detections.a)
	})

	it('stored the response of detect in .observations', function(){
		jumbotron.observations.should.containEql(detections.a)
	})

})

describe('.construct', function(){

	before(function(){
		jumbotron.construct()
	})

	it('transformed clients appropriately')
	it('gave a width and height in the correct ratio')

	describe('with more observations', function(){

		it('returned markers obscured by some observations');
		it('corrected erronous observations');

	})

})

describe('recognition', function(){

	// given several images

	it('identified markers')
	it('positioned markers')

})

describe('utils', function(){

	describe('mapToUnit', function(){
		var corners = detections.a[0].corners,
			transform,   // the matrix transform that will be generated
			transformed; // the corners transformed by the matrix

		before(function(){
			transform = jumbotron.util.mapToUnit(corners);

			// use the computed tranform matrix to re-transform the corners
			transformed = corners.map(function(corner){
				var vector = $V([corner.x,corner.y,1]);
				return transform.x(vector)
			})
		});

		it('returned a matrix', function(){
			transform.should.be.an.instanceOf(Matrix);
		})
		it('maps corner 0 to 0,0', function(){
			match_point(transformed[0], [0,0], .5)
		})

		it('maps corner 1 to 1,0', function(){
			match_point(transformed[1], [1,0], .5)
		})

		it('maps corner 2 to 1,1', function(){
			match_point(transformed[2], [1,1], .5)
		})

		it('maps corner 3 to 0,1', function(){
			match_point(transformed[3], [0,1], .5)
		})

	})

})


function match_point(vector, array, accuracy){
	vector.elements[0].should.be.approximately(array[0],accuracy)
	vector.elements[1].should.be.approximately(array[1],accuracy)
}
{'fraction_non_alphanumeric': 0.16909871244635194, 'fraction_numerical': 0.019456366237482117, 'mean_word_length': 4.7785123966942145, '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': '5849347', 'n_tokens_mistral': 1331, 'n_tokens_neox': 1130, 'n_words': 255}