<commit_before># MemoParser

A text parsing engine for [MemoRabble](https://github.com/CLUSTERfoo/MemoRabble).

## Objective

Given the following input:

```ruby

PLain text followed by markers: 

"@relationA:some_content, @relationA:more_content, @relationB:last_relation

#tagA:some_tag #tagB:another_tag."
```

Produce the following ruby hash as an output:


```ruby
{
  relations:
  {
    relationA: ["some_content", "more_content"],
    relationB: ["last_relation"]
  },
  
  tags: 
  {
    tagA: ["some_tag"],
    tagB: ["another_tag"]
  },
}
```

## Terms

The parser looks for *markers*. Markers take the form:

    (identifier)(label):(node)

For example:

    @user:clusterfoo
    #tag:cool_stuff

**Identifier:** 

This tells us what sort of marker it is. A <commit_msg>Readme also updated specs.<commit_after># MemoParser

A text parsing engine for [MemoRabble](https://github.com/CLUSTERfoo/MemoRabble).

## Objective

Given the following input:

```ruby

"PLain text followed by markers: 

@relationA:some_content, @relationA:more_content, @relationB:last_relation

#tagA:some_tag #tagB:another_tag."
```

Produce the following ruby hash as an output:


```ruby
{
  relations:
  {
    relationA: ["some_content", "more_content"],
    relationB: ["last_relation"]
  },
  
  tags: 
  {
    tagA: ["some_tag"],
    tagB: ["another_tag"]
  },
}
```

And the following string:

```ruby

"PLain text followed by markers: 

<a href="link_to_memo_id">@relationA:some_contenti</a>, 
<a href="link_to_memo_id">@relationA:more_content</a>, 
<a href="link_to_memo_id">@relationB:last_relation</a>

#tagA:some_tag #tagB:another_tag."
```

## Terms

The parser looks for *markers*. Markers take the form:

    (identifier)(label):(node)

For example:

    @user:clusterfoo
    #tag:cool_stuff

**Identifier:** 

This tells us what sort of marker it is. A 
{'fraction_non_alphanumeric': 0.14016172506738545, 'fraction_numerical': 0.0, 'mean_word_length': 4.458823529411765, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '3341619', 'n_tokens_mistral': 709, 'n_tokens_neox': 661, 'n_words': 161}