<commit_before># StAEDI - Streaming API for EDI
[![Build Status](https://travis-ci.com/xlate/staedi.svg?branch=master)](https://travis-ci.com/xlate/staedi) [![Coverage Status](https://coveralls.io/repos/github/xlate/staedi/badge.svg?branch=master)](https://coveralls.io/github/xlate/staedi?branch=master) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xlate_staedi&metric=alert_status)](https://sonarcloud.io/dashboard?id=xlate_staedi) [![Join the chat at https://gitter.im/xlate/staedi](https://badges.gitter.im/xlate/staedi.svg)](https://gitter.im/xlate/staedi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Overview

StAEDI is a streaming API for EDI reading and writing for Java based on the StAX (Streaming API for XML)
available in the standard JDK. The API follows the same conventions as StAX using a "pull" processing flow
for reading and an emit flow for writing. StAEDI also supports filters to allow client applications to
process only certain events in the input stream such as segment begin events.

StAEDI is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)

## Maven Coordinates

```xml
<dependency>
  <groupId>io.xlate</groupId>
  <artifactId>staedi</artifactId>
  <version>1.1.0</version>
</dependency>
```

If you wish to use a SNAPSHOT version, add the Sonatype OSS repository to your Maven configuration.

```xml
<repositories>
  <repository>
    <id>oss-sonatype</id>
    <name>oss-sonatype</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>
```

## Reading EDI

Input data is provided using a series of events via the `EDIStreamReader` class.
In addition to events such as the start of a segment or element, the looping/nested structure of the
EDI stream is represented using derived events.

```
+ Start Interchange<commit_msg>Update version in README<commit_after># StAEDI - Streaming API for EDI
[![Build Status](https://travis-ci.com/xlate/staedi.svg?branch=master)](https://travis-ci.com/xlate/staedi) [![Coverage Status](https://coveralls.io/repos/github/xlate/staedi/badge.svg?branch=master)](https://coveralls.io/github/xlate/staedi?branch=master) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xlate_staedi&metric=alert_status)](https://sonarcloud.io/dashboard?id=xlate_staedi) [![Join the chat at https://gitter.im/xlate/staedi](https://badges.gitter.im/xlate/staedi.svg)](https://gitter.im/xlate/staedi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

## Overview

StAEDI is a streaming API for EDI reading and writing for Java based on the StAX (Streaming API for XML)
available in the standard JDK. The API follows the same conventions as StAX using a "pull" processing flow
for reading and an emit flow for writing. StAEDI also supports filters to allow client applications to
process only certain events in the input stream such as segment begin events.

StAEDI is licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)

## Maven Coordinates

```xml
<dependency>
  <groupId>io.xlate</groupId>
  <artifactId>staedi</artifactId>
  <version>1.2.0</version>
</dependency>
```

If you wish to use a SNAPSHOT version, add the Sonatype OSS repository to your Maven configuration.

```xml
<repositories>
  <repository>
    <id>oss-sonatype</id>
    <name>oss-sonatype</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>
```

## Reading EDI

Input data is provided using a series of events via the `EDIStreamReader` class.
In addition to events such as the start of a segment or element, the looping/nested structure of the
EDI stream is represented using derived events.

```
+ Start Interchange
{'fraction_non_alphanumeric': 0.12471598081292602, 'fraction_numerical': 0.0035344609946983086, 'mean_word_length': 5.095384615384615, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 20, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '277861', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1270, 'n_words': 346}