<commit_before>#!/usr/bin/env python

import sys
import json

viewName = sys.argv[1]
mapFile = sys.argv[2]

with open(mapFile) as fm:
    mapFunction = fm.read()
    viewContent = {
        'name': viewName,
        'func': mapFunction
    }
    print json.dumps(viewContent)<commit_msg>Fix couchbase create view (#124)<commit_after>#!/usr/bin/env python

import sys
import json

viewName = sys.argv[1]
mapFile = sys.argv[2]

with open(mapFile) as fm:
    mapFunction = fm.read()
    viewContent = {
        'views': {
            viewName: {
                'map': mapFunction,
            }
        }
    }
    print json.dumps(viewContent)
{'fraction_non_alphanumeric': 0.12461059190031153, 'fraction_numerical': 0.010903426791277258, 'mean_word_length': 2.4021164021164023, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7234985', 'n_tokens_mistral': 227, 'n_tokens_neox': 214, 'n_words': 49}