<commit_before>SPSS - php implementation
====

## Requirements
* PHP 5.3.0 and up.

##Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist tiamo/spss "*"
```

or add

```
"tiamo/spss": "*"
```

to the require section of your `composer.json` file.


Usage
-----

Reader example:
```php
$reader = \SPSS\Reader::fromFile('path/to/file.sav');
```
or
```php
$reader = \SPSS\Reader::fromString(file_get_contents('path/to/file.sav'));
```

Writer example:

```php
$writer = new \SPSS\Writer([
    'header' => [
            'prodName'     => '@(#) SPSS DATA FILE test',
            'layoutCode'   => 2,
            'compression'  => 1,
            'weightIndex'  => 0,
            'bias'         => 100,
            'creationDate' => '13 Feb 89',
            'creationTime' => '13:13:13',
    ],
    'variables' => [
        [
                'name'     => 'VAR1',
                'width'    => 0,
                'decimals' => 0
                'format'   => 5,
                'columns'  => 50,
                'align'    => 1,
                'measure'  => 1,
                'data'     => [
                    1, 2, 3
                ],
        ],
        ...
    ]
]);
```<commit_msg>+ license<commit_after>SPSS - php implementation
====

## Requirements
* PHP 5.3.0 and up.

##Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist tiamo/spss "*"
```

or add

```
"tiamo/spss": "*"
```

to the require section of your `composer.json` file.


Usage
-----

Reader example:
```php
$reader = \SPSS\Reader::fromFile('path/to/file.sav');
```
or
```php
$reader = \SPSS\Reader::fromString(file_get_contents('path/to/file.sav'));
```

Writer example:

```php
$writer = new \SPSS\Writer([
    'header' => [
            'prodName'     => '@(#) SPSS DATA FILE test',
            'layoutCode'   => 2,
            'compression'  => 1,
            'weightIndex'  => 0,
            'bias'         => 100,
            'creationDate' => '13 Feb 89',
            'creationTime' => '13:13:13',
    ],
    'variables' => [
        [
                'name'     => 'VAR1',
                'width'    => 0,
                'decimals' => 0
                'format'   => 5,
                'columns'  => 50,
                'align'    => 1,
                'measure'  => 1,
                'data'     => [
                    1, 2, 3
                ],
        ],
        ...
    ]
]);
```

## License
Licensed under the [MIT license](http://opensource.org/licenses/MIT).
{'fraction_non_alphanumeric': 0.1791044776119403, 'fraction_numerical': 0.022388059701492536, 'mean_word_length': 1.5928433268858802, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 37, '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': '2667152', 'n_tokens_mistral': 963, 'n_tokens_neox': 853, 'n_words': 191}