<commit_before># improve.ai - Self-Improving App iOS SDK
 
[![CI Status](http://img.shields.io/travis/<NAME>/Improve.svg?style=flat)](https://travis-ci.org/<NAME>/Improve)
[![Version](https://img.shields.io/cocoapods/v/Improve.svg?style=flat)](http://cocoapods.org/pods/Improve)
[![License](https://img.shields.io/cocoapods/l/Improve.svg?style=flat)](http://cocoapods.org/pods/Improve)
[![Platform](https://img.shields.io/cocoapods/p/Improve.svg?style=flat)](http://cocoapods.org/pods/Improve)


## Installation

Improve is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "Improve"
```

### Hello World!

improve.ai enables apps to optimize their own event funnels.  For our "Hello World" we'll do continuous improvement on a funnel going from *Viewed* to *Clicked*.  This use case is similar to A/B testing except it is fully automated with no human intervention and new variants can be added at any time.

First we simply import and initialize the SDK.

```objc
#import Improve.h

[Improve sharedInstanceWithApiKey:@"YOUR API KEY"];

```

Visit [improve.ai](http://improve.ai) to sign up for an api key.

Let's set up our funnel and greeting choices.

```objc
NSArray *funnel = [@"Viewed", @"Clicked"];

NSArray *choices = [@"Hello World!", @"Hi World!", @"Howdy World!"]; // other possible greetings

```

This is where the magic happens - let improve.ai choose the best *greeting* given the choices and funnel:

```objc
Improve *improve = [Improve sharedInstance];
[improve chooseFrom:choices forKey:@"greeting" funnel:funnel block:^(NSString* result) {
  greeting = result;
}];

```
Elsewhere in our code, when the greeting is viewed, we track the event so improve.ai can learn.

```objc
[improve track:@"Viewed" properties:@{ @"greeting": greeting }];

```

Likewise with *Clicked*.

```objc
[improve track:@"Clicked" properties:@{ @"greeting": greeting }];

```

That's all there is to it.  Forever more improve.ai will learn and optimize the greeting to maximize the probability of going from *Viewed* to *Clicked*.  With each new user the app will improve, without you having to actively manage the process.

For further documentation see [improve.ai](https://www.improve.ai).

## Author

<NAME>, <EMAIL>

## License

The improve.ai iOS SDK is available under the MIT license. See the LICENSE file for more info.
<commit_msg>tweaked example<commit_after># improve.ai - Self-Improving App iOS SDK
 
[![CI Status](http://img.shields.io/travis/Just<NAME>eske/Improve.svg?style=flat)](https://travis-ci.org/<NAME>/Improve)
[![Version](https://img.shields.io/cocoapods/v/Improve.svg?style=flat)](http://cocoapods.org/pods/Improve)
[![License](https://img.shields.io/cocoapods/l/Improve.svg?style=flat)](http://cocoapods.org/pods/Improve)
[![Platform](https://img.shields.io/cocoapods/p/Improve.svg?style=flat)](http://cocoapods.org/pods/Improve)


## Installation

Improve is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "Improve"
```

### Hello World!

improve.ai enables apps to optimize their own event funnels.  For our "Hello World" we'll do continuous improvement on a funnel going from *Viewed* to *Clicked*.  This use case is similar to A/B testing except it is fully automated with no human intervention and new variants can be added at any time.

First we simply import and initialize the SDK.

```objc
#import Improve.h

[Improve sharedInstanceWithApiKey:@"YOUR API KEY"];

```

Visit [improve.ai](http://improve.ai) to sign up for an api key.

Let's set up our funnel and greeting choices.

```objc
NSArray *funnel = [@"Viewed", @"Clicked"];

NSArray *choices = [@"Hello World!", @"Hi World!", @"Howdy World!"]; 

```

This is where the magic happens - let improve.ai choose the best *greeting* given the choices and funnel:

```objc
Improve *improve = [Improve sharedInstance];
[improve chooseFrom:choices forKey:@"greeting" funnel:funnel block:^(NSString* result) {
  greeting = result;
}];

```
Elsewhere in our code, when the greeting is viewed, we track the event so improve.ai can learn.

```objc
[improve track:@"Viewed" properties:@{ @"greeting": greeting }];

```

Likewise with *Clicked*.

```objc
[improve track:@"Clicked" properties:@{ @"greeting": greeting }];

```

That's all there is to it.  Forever more improve.ai will learn and optimize the greeting to maximize the probability of going from *Viewed* to *Clicked*.  With each new user the app will improve, without you having to actively manage the process.

For further documentation see [improve.ai](https://www.improve.ai).

## Author

<NAME>, <EMAIL>

## License

The improve.ai iOS SDK is available under the MIT license. See the LICENSE file for more info.

{'fraction_non_alphanumeric': 0.13926418623986697, 'fraction_numerical': 0.0, 'mean_word_length': 4.861144945188794, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, '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': '584663', 'n_tokens_mistral': 1703, 'n_tokens_neox': 1512, 'n_words': 520}