<commit_before># OTRS::SOPM

This gem provides a class to parse, manipulate and store SOPM files and create OPM strings from them.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'otrs-sopm'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install otrs-sopm

## Usage

First create an instance via passing the location to the .sopm file.

```ruby
sopm = OTRS::SOPM.new 'path/to/Znuny4OTRS-Package.sopm'
```

### Create version

A new version can be created via passing the wanted version number and a changelog:

```ruby
sopm_hash_structure = sopm.version('1.0.1', 'Created first bug fix.')<commit_msg>Improved README.md.<commit_after># OTRS::SOPM

This gem provides a class to parse, manipulate and store SOPM files and create OPM strings from them.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'otrs-sopm'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install otrs-sopm

## Usage

First create an instance via passing the location to the .sopm file.

```ruby
require 'otrs/sopm'

sopm = OTRS::SOPM.new 'path/to/Znuny4OTRS-Package.sopm'
```

### Create version

A new version can be created via passing the wanted version number and a changelog:

```ruby
sopm_hash_structure = sopm.version('1.0.1', 'Created first bug fix.')
{'fraction_non_alphanumeric': 0.10067114093959731, 'fraction_numerical': 0.005965697240865026, 'mean_word_length': 4.083333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2290560', 'n_tokens_mistral': 488, 'n_tokens_neox': 455, 'n_words': 170}