<commit_before>"""Command line tool to execute a set of pythogram tasks."""
import sys
import json
import logging
from gramcore.data import images, arrays
from gramcore.filters import edges, statistics
from gramcore.transformations import arithmetic, geometric


logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('gramcore')


MAPPING = {
    'images.fromarray': images.fromarray,
    'images.load': images.load,
    'images.save': images.save,
    # leaving this out for the moment since it isn't necessary to end users
    #'images.syth_positions': images.synth_positions,
    'images.synthetic': images.synthetic,
    'images.tiled': images.tiled,
    'arrays.asarray': arrays.asarray,
    'arrays.get_shape': arrays.get_shape,
    'arrays.gaussian_noise': arrays.gaussian_noise,
    'arrays.load': arrays.load,
    'arrays.save': arrays.save,
    'arrays.split': arrays.split,
    'arrays.dtm': arrays.dtm,
    'arrays.dsm': arrays.dsm,
    'edges.canny': edges.canny,
    'edges.prewitt': edges.prewitt,
    'edges.sobel': edges.sobel,
    'statistics.maximum': statistics.maximum,
    'statistics.average': statistics.mean,
    'statistics.median': statistics.median,
    'statistics.minimum': statistics.minimum,
    'statistics.stddev': statistics.stddev,
    'arithmetic.add': arithmetic.add,
    'arithmetic.diff': arithmetic.diff,
    'arithmetic.divide': arithmetic.divide,
    'arithmetic.ndvi': arithmetic.ndvi,
    'geometric.resize': geometric.resize,
    'geometric.rotate': geometric.rotate,
}


def get_args(json_file):<commit_msg>Add mapping for new functions<commit_after>"""Command line tool to execute a set of pythogram tasks."""
import sys
import json
import logging
from gramcore.data import images, arrays
from gramcore.filters import edges, statistics, morphology, thresholds
from gramcore.transformations import arithmetic, geometric


logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('gramcore')


MAPPING = {
    'images.fromarray': images.fromarray,
    'images.load': images.load,
    'images.save': images.save,
    # leaving this out for the moment since it isn't necessary to end users
    #'images.syth_positions': images.synth_positions,
    'images.synthetic': images.synthetic,
    'images.tiled': images.tiled,
    'arrays.asarray': arrays.asarray,
    'arrays.get_shape': arrays.get_shape,
    'arrays.gaussian_noise': arrays.gaussian_noise,
    'arrays.load': arrays.load,
    'arrays.save': arrays.save,
    'arrays.split': arrays.split,
    'arrays.dtm': arrays.dtm,
    'arrays.dsm': arrays.dsm,
    'edges.canny': edges.canny,
    'edges.prewitt': edges.prewitt,
    'edges.sobel': edges.sobel,
    'morphology.closing': morphology.closing,
    'morphology.erosion': morphology.erosion,
    'morphology.dilation': morphology.dilation,
    'morphology.opening': morphology.opening,
    'statistics.maximum': statistics.maximum,
    'statistics.average': statistics.mean,
    'statistics.median': statistics.median,
    'statistics.minimum': statistics.minimum,
    'statistics.stddev': statistics.stddev,
    'thresholds.binary': thresholds.binary,
    'thresholds.otsu': thresholds.otsu,
    'arithmetic.add': arithmetic.add,
    'arithmetic.diff': arithmetic.diff,
    'arithmetic.divide': arithmetic.divide,
    'arithmetic.ndvi': arithmetic.ndvi,
    'geometric.resize': geometric.resize,
    'geometric.rotate': geometric.rotate,
}


def get_args(json_file):
{'fraction_non_alphanumeric': 0.1294254207777133, 'fraction_numerical': 0.0, 'mean_word_length': 4.344186046511628, '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': '2858233', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1048, 'n_words': 229}