<commit_before># Gherkin 3

[![Join the chat at https://gitter.im/cucumber/gherkin3](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/gherkin3?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/cucumber/gherkin3.png)](https://travis-ci.org/cucumber/gherkin3)

Gherkin 3 is a parser and compiler for the Gherkin language.

It is intended to replace [Gherkin 2](https://github.com/cucumber/gherkin) and be used by
all [Cucumber](https://cukes.info) implementations to parse `.feature` files.

Gherkin 3 is currently implemented for the following platforms:

* .NET (C#)
* JVM (Java)
* JavaScript (Browser or Node.js/IO.js)
* Ruby (MRI, JRuby or any other Ruby implementation)
* Go
* Python

See `CONTRIBUTING.md` if you want to contribute a parser for a new language.
Our wish-list is (in no particular order):

* C
* Perl
* PHP
* Rust
* Swift

## Example

```java
// Java
Parser<Feature> parser = new Parser<>(new AstBuilder());
Feature feature = parser.parse("Feature: ...");
```

```csharp
// C#
var parser = new Parser();
var feature = parser.Parse("Feature: ...");
```

```ruby
# Ruby
require 'gherkin3/parser'
parser = Gherkin3::Parser.new
feature = parser.parse("Feature: ...")
```

```javascript
// JavaScript
var Gherkin = require('gherkin');
var parser = new Gherkin.Parser();
var feature = parser.parse("Feature: ...");
```

```go
// Go
import (
  "strings"
  "github.com/cucumber/gherkin-go"
)
reader := strings.NewReader(`Feature: ...`)
feature, err := gherkin.ParseFeature(reader)
```
*Download the package via: `go get github.com/cucumber/gherkin-go`*

```python<commit_msg>Fix Ruby example in Readme<commit_after># Gherkin 3

[![Join the chat at https://gitter.im/cucumber/gherkin3](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cucumber/gherkin3?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/cucumber/gherkin3.png)](https://travis-ci.org/cucumber/gherkin3)

Gherkin 3 is a parser and compiler for the Gherkin language.

It is intended to replace [Gherkin 2](https://github.com/cucumber/gherkin) and be used by
all [Cucumber](https://cukes.info) implementations to parse `.feature` files.

Gherkin 3 is currently implemented for the following platforms:

* .NET (C#)
* JVM (Java)
* JavaScript (Browser or Node.js/IO.js)
* Ruby (MRI, JRuby or any other Ruby implementation)
* Go
* Python

See `CONTRIBUTING.md` if you want to contribute a parser for a new language.
Our wish-list is (in no particular order):

* C
* Perl
* PHP
* Rust
* Swift

## Example

```java
// Java
Parser<Feature> parser = new Parser<>(new AstBuilder());
Feature feature = parser.parse("Feature: ...");
```

```csharp
// C#
var parser = new Parser();
var feature = parser.Parse("Feature: ...");
```

```ruby
# Ruby
require 'gherkin3/parser'
require 'gherkin3/token_scanner'
parser = Gherkin3::Parser.new
scanner = Gherkin3::TokenScanner.new("Feature: ...")
feature = parser.parse(scanner)
```

```javascript
// JavaScript
var Gherkin = require('gherkin');
var parser = new Gherkin.Parser();
var feature = parser.parse("Feature: ...");
```

```go
// Go
import (
  "strings"
  "github.com/cucumber/gherkin-go"
)
reader := strings.NewReader(`Feature: ...`)
feature, err := gherkin.ParseFeature(reader)
```
*Download the package via: `go get github.com/cucumber/gherkin-go`*

```python
{'fraction_non_alphanumeric': 0.1650174621653085, 'fraction_numerical': 0.007566938300349243, 'mean_word_length': 4.709302325581396, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 14, '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': '434767', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1206, 'n_words': 305}