<commit_before># Open Mining Language
Language to preprocess Olap Cubes


## Sample

DataSet:

    [
        {"nome": "<NAME>", "field1": 10, "field2": 20, "address": "Av. Castelo Branco, 1300, Cacapava, SP, Brasil"},
        {"nome": "<NAME>", "field1": 30, "field2": 40, "address": "Cacapava, SP, Brasil"},
        {"nome": "<NAME>", "field1": 50, "field2": 60, "address": "Sao Jose dos Campos, SP, Brasil"}
    ]

OML:

    ROW('new_collum1', SUM({@field1, @field2}))
    ROW('new_collum2', SUBTRACT({@field1, @field2}))
    ROW('geo', GEO_LOCATION("@address"))

Return:

    {u'new_collum1': 30, u'new_collum2': -30, 'nome': '<NAME>', 'field2': 20, 'field1': 10, 'address': 'Av. Castelo Branco, 1300, Cacapava, SP, Brasil', u'geo': {u'lat': -23.1036861, u'lng': -45.7197228}}
    {u'new_collum1': 70, u'new_collum2': -70, 'nome': '<NAME>', 'field2': 40, 'field1': 30, 'address': 'Cacapava, SP, Brasil', u'geo': {u'lat': -23.0996965, u'lng': -45.7080824}}
    {u'new_collum1': 110, u'new_collum2': -110, 'nome': '<NAME>', 'field2': 60, 'field1': 50, 'address': 'Sao Jose dos Campos, SP, Brasil', u'geo': {u'lat': -23.223701, u'lng': -45.9009074}}


## TODO

- [x] Run lua
- [ ] Run R (We spent a day doing a proof of concept and we can't use simply as Moon, let's start the project with Moon after we returned in R)<commit_msg>added new functions<commit_after># Open Mining Language
Language to preprocess Olap Cubes


## Sample

DataSet:

    [
        {"nome": "<NAME>", "field1": 10, "field2": 20, "address": "Av. Castelo Branco, 1300, Cacapava, SP, Brasil"},
        {"nome": "<NAME>", "field1": 30, "field2": 40, "address": "Cacapava, SP, Brasil"},
        {"nome": "<NAME>", "field1": 50, "field2": 60, "address": "Sao Jose dos Campos, SP, Brasil"}
    ]

OML:

    ROW('new_collum1', OML.SUM({@field1, @field2}))
    ROW('new_collum2', OML.SUB({@field1, @field2}))
    ROW('geo', OML.GEO_LOCATION("@address"))
    ROW('func', function() return 'abc' end)
    {dict1=@field1*@field2, dict2=123}

Return:

    {u'new_collum1': 30, u'new_collum2': -30, 'nome': '<NAME>', 'field2': 20, 'field1': 10, 'address': 'Av. Castelo Branco, 1300, Cacapava, SP, Brasil', u'geo': {u'lat': -23.1036861, u'lng': -45.7197228}}
    {u'new_collum1': 70, u'new_collum2': -70, 'nome': '<NAME>', 'field2': 40, 'field1': 30, 'address': 'Cacapava, SP, Brasil', u'geo': {u'lat': -23.0996965, u'lng': -45.7080824}}
    {u'new_collum1': 110, u'new_collum2': -110, 'nome': '<NAME>', 'field2': 60, 'field1': 50, 'address': 'Sao Jose dos Campos, SP, Brasil', u'geo': {u'lat': -23.223701, u'lng': -45.9009074}}


## TODO

- [x] Run lua
- [ ] Run R (We spent a day doing a proof of concept and we can't use simply as Moon, let's start the project with Moon after we returned in R)
{'fraction_non_alphanumeric': 0.22052956111715633, 'fraction_numerical': 0.0917664127675009, 'mean_word_length': 4.334622823984526, 'pattern_counts': {'":': 24, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, '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': '5461800', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1103, 'n_words': 318}