<commit_before># Hoot

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'hoot'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install hoot

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it ( https://github.com/[my-github-username]/hoot/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request<commit_msg>Basic instructions<commit_after># Hoot

```
           -------
  ._____. ( Hoot! )
  { O,o }  -y-----
  (____(\
   ="="=
```

Hoot is the language [Orwell](orwell.io) uses to define rules with a set of conditions and outcomes.

## Installation

Add this line to your application's Gemfile:

	gem 'hoot', github: 'doomspork/hoot'

## Context

Hoot is just a grammar, parser, and a simple runtime.  Evaluating variable values, both local and shared, is handled through the `Context`.  The `Context` is responsible for providing a lookup for actions.  A `Context` can be any Ruby object that implements these three methods:

+ `#local(String)`
+ `#shared(String)`
+ `#function(String)`

Here is an example `Context` which uses hashes to back the variable stores and defines two functions: `ECHO` and `LEN`:

```ruby
class Context
  attr_reader :locals, shared
  def initialize(locals, shared)
    @locals = locals
    @shared = shared
  end
  
  def local(name)
    locals[name]
  end
	
  def shared(name)
    shared[name]
  end
  
  def function(name)
  	case name
  	when 'ECHO'
  	  proc { |str| puts str }
  	when 'LEN'
  	  proc { |str| str.length }
  	end
  end
end
```

## Usage

```ruby
Hoot.run(code, context)
```

## Contributing

Contributions of any kind are always welcome.  Please make use of [Issues](https://github.com/doomspork//issues) and [Pull Requests](https://github.com/doomspork/hoot/pulls), all code should have test coverage.

## Author/Contact

Hoot is written and maintained by [@doomspork](github.com/doomspork).

## License

Mole is made available under the [MIT](http://opensource.org/licenses/MIT) License.


{'fraction_non_alphanumeric': 0.11873589164785553, 'fraction_numerical': 0.002257336343115124, 'mean_word_length': 3.513238289205703, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '3645924', 'n_tokens_mistral': 747, 'n_tokens_neox': 711, 'n_words': 259}