<commit_before># OneDollar-CoffeeScript

Implementation of the [$1 Gesture Recognizer](http://depts.washington.edu/aimgroup/proj/dollar/), a two-dimensional template based gesture recognition, for [CoffeeScript](http://coffeescript.org/).


## About

The [$1 Gesture Recognizer](http://depts.washington.edu/aimgroup/proj/dollar/) is a research project by <NAME> and Li of the University of Washington and Microsoft Research. It describes a simple algorithm for accurate and fast recognition of drawn gestures.

Gestures can be recognised at any position, scale, and under any rotation. The system requires little training, achieving a 97% recognition rate with only one template for each gesture.

> <NAME>., <NAME>. and <NAME>. (2007). [Gestures without libraries, toolkits or training: A $1 recognizer for user interface prototypes](http://faculty.washington.edu/wobbrock/pubs/uist-07.1.pdf). Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '07). Newport, Rhode Island (October 7-10, 2007). New York: ACM Press, pp. 159-168.


## Usage

### JavaScript

HTML

```html
<script src="onedollar.js"></script>	
```

JavaScript

```javascript
var one = new OneDollar();

one.add('triangle', [[137,139], [135,141], [154,160], [148,155] /* , ... */ ]);
one.add('circle', [[127,141] ,[124,140], [129,136], [126,139] /* , ... */ ]);
// one.remove('circle');

one.on('triangle', function(result){
	console.log(result);
});
one.on('circle', function(result){
	console.log(result);
});
// one.off('circle');

one.check([[99,231],[108,232], ... ,[153,232],[160,233]]);
```

### jQuery

HTML

```html
<script src="jquery.min.js"></script>
<script src="onedollar.js"></script>
<script src="onedollar.jquery.js"></script>
```

JavaScript

```javascript
$(document).ready(function() {

	$('#js-sketch').onedollar();
	
});
```<commit_msg>add sublines<commit_after># OneDollar-CoffeeScript

Implementation of the [$1 Gesture Recognizer](http://depts.washington.edu/aimgroup/proj/dollar/), a two-dimensional template based gesture recognition, for [CoffeeScript](http://coffeescript.org/).


## About

The [$1 Gesture Recognizer](http://depts.washington.edu/aimgroup/proj/dollar/) is a research project by Wobbrock, Wilson and Li of the University of Washington and Microsoft Research. It describes a simple algorithm for accurate and fast recognition of drawn gestures.

Gestures can be recognised at any position, scale, and under any rotation. The system requires little training, achieving a 97% recognition rate with only one template for each gesture.

> <NAME>., <NAME>. and <NAME>. (2007). [Gestures without libraries, toolkits or training: A $1 recognizer for user interface prototypes](http://faculty.washington.edu/wobbrock/pubs/uist-07.1.pdf). Proceedings of the ACM Symposium on User Interface Software and Technology (UIST '07). Newport, Rhode Island (October 7-10, 2007). New York: ACM Press, pp. 159-168.


## Usage

### JavaScript

```html
<script src="onedollar.js"></script>	
```

```javascript
var one = new OneDollar();

one.add('triangle', [[137,139], [135,141], [154,160], [148,155] /* , ... */ ]);
one.add('circle', [[127,141] ,[124,140], [129,136], [126,139] /* , ... */ ]);
// one.remove('circle');

one.on('triangle', function(result){
	console.log(result);
});
one.on('circle', function(result){
	console.log(result);
});
// one.off('circle');

one.check([[99,231],[108,232], ... ,[153,232],[160,233]]);
```

### jQuery

```html
<script src="jquery.min.js"></script>
<script src="onedollar.js"></script>
<script src="onedollar.jquery.js"></script>
```

```javascript
$(document).ready(function() {
	$('#js-sketch').onedollar();
});
```
{'fraction_non_alphanumeric': 0.18307943416757344, 'fraction_numerical': 0.05331882480957562, 'mean_word_length': 5.047697368421052, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 28, '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': '435823', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1136, 'n_words': 332}