<commit_before># SwiftUnistroke
### $1 Unistroke Gesture Recognizer in pure Swift

[![CI Status](http://img.shields.io/travis/Daniele Margutti/SwiftUnistroke.svg?style=flat)](https://travis-ci.org/<NAME>/SwiftUnistroke)
[![Version](https://img.shields.io/cocoapods/v/SwiftUnistroke.svg?style=flat)](http://cocoapods.org/pods/SwiftUnistroke)
[![License](https://img.shields.io/cocoapods/l/SwiftUnistroke.svg?style=flat)](http://cocoapods.org/pods/SwiftUnistroke)
[![Platform](https://img.shields.io/cocoapods/p/SwiftUnistroke.svg?style=flat)](http://cocoapods.org/pods/SwiftUnistroke)

![SwiftUnistroke](https://raw.githubusercontent.com/malcommac/SwiftUnistroke/master/swiftunistroke.png)

[![SwiftUnistroke](https://raw.githubusercontent.com/malcommac/SwiftUnistroke/master/ExampleMovie.mp4)](Movie)


## Description
SwiftUnistroke is a pure Swift 2 implementation of the $1 Unistroke Algorithm developed by <NAME>, <NAME> and <NAME>.

The $1 Unistroke Recognizer is a 2-D single-stroke recognizer designed for rapid prototyping of gesture-based user interfaces.

In machine learning terms, $1 is an instance-based nearest-neighbor classifier with a Euclidean scoring function, i.e., a geometric template matcher.

Despite its simplicity, $1 requires very few templates to perform well and is only about 100 lines of code, making it easy to deploy. An optional enhancement called Protractor improves $1's speed.

A more detailed description of the algorithm is available both on [official project paper](http://faculty.washington.edu/wobbrock/pubs/uist-07.01.pdf) and on my [blog's article here](http://danielemargutti.com/1-recognizer-in-swift-2/).

This library also contain an example project which demostrate how the algorithm works with a set of loaded templates; extends this library is pretty easy and does not involve any machine learning stuff.
Other languages implementation can be [found here](https://depts.washington.edu/aimgroup/proj/dollar/).

##Highlights
- [x] Fast gestures recognition
- [x] Simple code, less than 200 lines<commit_msg>Youtube video<commit_after># SwiftUnistroke
### $1 Unistroke Gesture Recognizer in pure Swift

[![CI Status](http://img.shields.io/travis/<NAME>/SwiftUnistroke.svg?style=flat)](https://travis-ci.org/<NAME>/SwiftUnistroke)
[![Version](https://img.shields.io/cocoapods/v/SwiftUnistroke.svg?style=flat)](http://cocoapods.org/pods/SwiftUnistroke)
[![License](https://img.shields.io/cocoapods/l/SwiftUnistroke.svg?style=flat)](http://cocoapods.org/pods/SwiftUnistroke)
[![Platform](https://img.shields.io/cocoapods/p/SwiftUnistroke.svg?style=flat)](http://cocoapods.org/pods/SwiftUnistroke)

![SwiftUnistroke](https://raw.githubusercontent.com/malcommac/SwiftUnistroke/master/swiftunistroke.png)

[![SwiftUnistroke](https://www.youtube.com/watch?v=P7wQVkmTkPY&feature=youtu.be)](Movie)


## Description
SwiftUnistroke is a pure Swift 2 implementation of the $1 Unistroke Algorithm developed by <NAME>, <NAME> and <NAME>.

The $1 Unistroke Recognizer is a 2-D single-stroke recognizer designed for rapid prototyping of gesture-based user interfaces.

In machine learning terms, $1 is an instance-based nearest-neighbor classifier with a Euclidean scoring function, i.e., a geometric template matcher.

Despite its simplicity, $1 requires very few templates to perform well and is only about 100 lines of code, making it easy to deploy. An optional enhancement called Protractor improves $1's speed.

A more detailed description of the algorithm is available both on [official project paper](http://faculty.washington.edu/wobbrock/pubs/uist-07.01.pdf) and on my [blog's article here](http://danielemargutti.com/1-recognizer-in-swift-2/).

This library also contain an example project which demostrate how the algorithm works with a set of loaded templates; extends this library is pretty easy and does not involve any machine learning stuff.
Other languages implementation can be [found here](https://depts.washington.edu/aimgroup/proj/dollar/).

##Highlights
- [x] Fast gestures recognition
- [x] Simple code, less than 200 lines
{'fraction_non_alphanumeric': 0.1169691025012261, 'fraction_numerical': 0.010299166257969592, 'mean_word_length': 5.68688524590164, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 14, 'lorem ipsum': 0, 'www.': 1, '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': '1283300', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1236, 'n_words': 353}