<commit_before># SLING - A natural language frame semantics parser

SLING is a parser for annotating text with frame semantic annotations. It is
trained on an annotated corpus using [Tensorflow](https://www.tensorflow.org/)
and [Dragnn](https://github.com/tensorflow/models/blob/master/syntaxnet/g3doc/DRAGNN.md).

## Installation

The parser trainer uses Tensorflow for training. SLING uses the Python 2.7
distribution of Tensorflow, so this needs to be installed. The installed version
of protocol buffers needs to match the version used by Tensorflow.

```shell
sudo pip install -U protobuf==3.3.0<commit_msg>Add diagram to README (#56)<commit_after># SLING - A natural language frame semantics parser

SLING is a parser for annotating text with frame semantic annotations. It is
trained on an annotated corpus using [Tensorflow](https://www.tensorflow.org/)
and [Dragnn](https://github.com/tensorflow/models/blob/master/syntaxnet/g3doc/DRAGNN.md).

The parser is a general transition-based frame semantic parser using
bi-directional LSTMs for input encoding and a Transition Based Recurrent Unit
(TBRU) for output decoding. It is a jointly trained model using only the text
tokens as input and the transition system has been designed to output frame
graphs directly without any intervening symbolic representation.

![SLING neural network architecture.](./doc/report/network.svg)

The SLING framework includes an efficient and scalable frame store
implementation as well as a neural network JIT compiler for fast parsing at
runtime.

## Installation

The parser trainer uses Tensorflow for training. SLING uses the Python 2.7
distribution of Tensorflow, so this needs to be installed. The installed version
of protocol buffers needs to match the version used by Tensorflow.

```shell
sudo pip install -U protobuf==3.3.0
{'fraction_non_alphanumeric': 0.0641799232035107, 'fraction_numerical': 0.007679648930334613, 'mean_word_length': 4.922077922077922, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '6105141', 'n_tokens_mistral': 498, 'n_tokens_neox': 456, 'n_words': 230}