<commit_before># MPEdn

An EDN ([Extensible Data Notation](http://github.com/edn-format/edn)) Objective C I/O library for OS X and iOS.

The library includes:

* `MPEdnParser`, a parser for reading EDN and generating equivalent Cocoa data structures.

* `MPEdnWriter`, which writes Cocoa data structures as EDN.

For most uses, parsing EDN is as simple as:

    [@"{:a 1}" ednStringToObject];

Which returns the parsed object or nil on error.

And to generate EDN from a Cocoa object:

    [myObject objectToEdnString];

See the headers for API docs.

## Using It In Your Project

To use the library, use one of (in decreasing order of ease-of-use):

* Install via [Cocoapods](http://cocoapods.org): add `pod 'MPEDN', '~> 1.0.0'` to your Podfile.

* Use a workspace containing your project and MPEdn as described [here][xcode_static_lib]. You may also need to add the `-all_load` flag to the "Other Linker Flags" section of your project if the `ednStringToObject` and `objectToEdnString` category methods do not get linked in.

* Generate `libMPEdn.a` using the supplied Xcode project and copy that and the `.h` files to your project.

[xcode_static_lib]: http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/AA-Developing_a_Static_Library_and_Incorporating_It_in_Your_Application/archiving_an_application_that_uses_a_static_library.html


## EDN To Cocoa Mapping

* EDN map <-> `NSDictionary` (but see `[MPEdnParser newDictionary]` to override).

* EDN list or vector <-> `NSArray` (but see `[MPEdnParser newArray]` to override).

* EDN set <-> `NSSet` (but see `[MPEdnParser newSet]` to override).

* EDN string <-> `NSString`.

* EDN float <-> `NSNumber` (`numberWithDouble`).

* EDN int <-> `NSNumber` (`numberWithLong`). The `N` (bigint) suffix is not supported.

* EDN decimal ('M' suffix, `BigDecimal` in Clojure) <-> `NSDecimalNumber`.

* EDN boolean <-> `NSNumber` (`numberWithBool`).

* EDN character <-> `NSNumber` (`numberWithUnsignedChar`).

* EDN keyword <-> `MPEdnKeyword`. If the `MPEdnWriter.useKeywordsInMaps` property is true (the default is false as of 0.2), strings used as keys in `NSDictionary` will be output as keywords if possible. Note that strings and keywords never compare as equal, so this could get confusing when reading a dictionary from an external service that uses keywords: in general, prefer explicit use of keywords where possible.<commit_msg>Correct the spelling of CocoaPods in README<commit_after># MPEdn

An EDN ([Extensible Data Notation](http://github.com/edn-format/edn)) Objective C I/O library for OS X and iOS.

The library includes:

* `MPEdnParser`, a parser for reading EDN and generating equivalent Cocoa data structures.

* `MPEdnWriter`, which writes Cocoa data structures as EDN.

For most uses, parsing EDN is as simple as:

    [@"{:a 1}" ednStringToObject];

Which returns the parsed object or nil on error.

And to generate EDN from a Cocoa object:

    [myObject objectToEdnString];

See the headers for API docs.

## Using It In Your Project

To use the library, use one of (in decreasing order of ease-of-use):

* Install via [CocoaPods](http://cocoapods.org): add `pod 'MPEDN', '~> 1.0.0'` to your Podfile.

* Use a workspace containing your project and MPEdn as described [here][xcode_static_lib]. You may also need to add the `-all_load` flag to the "Other Linker Flags" section of your project if the `ednStringToObject` and `objectToEdnString` category methods do not get linked in.

* Generate `libMPEdn.a` using the supplied Xcode project and copy that and the `.h` files to your project.

[xcode_static_lib]: http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/ios_development_workflow/AA-Developing_a_Static_Library_and_Incorporating_It_in_Your_Application/archiving_an_application_that_uses_a_static_library.html


## EDN To Cocoa Mapping

* EDN map <-> `NSDictionary` (but see `[MPEdnParser newDictionary]` to override).

* EDN list or vector <-> `NSArray` (but see `[MPEdnParser newArray]` to override).

* EDN set <-> `NSSet` (but see `[MPEdnParser newSet]` to override).

* EDN string <-> `NSString`.

* EDN float <-> `NSNumber` (`numberWithDouble`).

* EDN int <-> `NSNumber` (`numberWithLong`). The `N` (bigint) suffix is not supported.

* EDN decimal ('M' suffix, `BigDecimal` in Clojure) <-> `NSDecimalNumber`.

* EDN boolean <-> `NSNumber` (`numberWithBool`).

* EDN character <-> `NSNumber` (`numberWithUnsignedChar`).

* EDN keyword <-> `MPEdnKeyword`. If the `MPEdnWriter.useKeywordsInMaps` property is true (the default is false as of 0.2), strings used as keys in `NSDictionary` will be output as keywords if possible. Note that strings and keywords never compare as equal, so this could get confusing when reading a dictionary from an external service that uses keywords: in general, prefer explicit use of keywords where possible.
{'fraction_non_alphanumeric': 0.10323637853338796, 'fraction_numerical': 0.0024580090126997134, 'mean_word_length': 4.751472320376914, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1476480', 'n_tokens_mistral': 1589, 'n_tokens_neox': 1526, 'n_words': 591}