<commit_before>def register(event_dispatcher):
    def _enable_experimental_handlers(_, event_data):
        """The user can opt in to experimental event handlers by
        passing an --experimental flag on the command line
        """
        try:
            event_data['args'].remove('--experimental')
            event_dispatcher.register(event_dispatcher.REGISTER_GLOBAL_PARAMETERS,
                                      id_filter)
            event_dispatcher.register(event_dispatcher.REGISTER_GLOBAL_PARAMETERS,
                                      generate_skeleton)
            event_dispatcher.register(event_dispatcher.REGISTER_GLOBAL_PARAMETERS,
                                      use_skeleton)
        except ValueError:
            pass

    def id_filter(_, event_data):
        """Filter to only return the Id property
        from the result.
        """
        try:
            event_data['args'].remove('--id-only')
            def filter_output(_, event_data):
                import jmespath
                event_data['result'] = jmespath.search('[*].id', event_data['result'])
            event_dispatcher.register(event_dispatcher.TRANSFORM_RESULT, filter_output)
        except IndexError:
            pass
        except ValueError:
            pass
<commit_msg>Fix up experimental command line params.<commit_after>def register(event_dispatcher):
    def _enable_experimental_handlers(_, event_data):
        """The user can opt in to experimental event handlers by
        passing an --experimental flag on the command line
        """
        try:
            event_data['args'].remove('--experimental')
            event_dispatcher.register(event_dispatcher.REGISTER_GLOBAL_PARAMETERS,
                                      generate_skeleton)
            event_dispatcher.register(event_dispatcher.REGISTER_GLOBAL_PARAMETERS,
                                      use_skeleton)
            event_dispatcher.register(event_dispatcher.PARSING_PARAMETERS,
                                      file_argument_value)
        except ValueError:
            pass

    def file_argument_value(_, event_data):
        """Replace provided parameter value with value from file
        if the parameter value starts with a '@'
        """
        def load_file(path):
            with open(path, 'r') as f:
                return f.read()

        args = event_data['args']
        for name in args.keys():
            value = args[name]
            try:
                if str.startswith(value, '@'):
                    args[name] = load_file(value[1:])
            except (TypeError, FileNotFoundError):
                pass

{'fraction_non_alphanumeric': 0.07727101394647569, 'fraction_numerical': 0.0003769317753486619, 'mean_word_length': 1.8084656084656086, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3735007', 'n_tokens_mistral': 653, 'n_tokens_neox': 645, 'n_words': 148}