<commit_before>/*ckwg +5
 * Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
 * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
 * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
 */

#include <vistk/pipeline/process.h>

#include <vistk/config.h>

#include <boost/make_shared.hpp>

using namespace vistk;

class VISTK_NO_EXPORT test_process
  : public vistk::process
{
  public:
    test_process(config_t const& config);
    ~test_process();
};

test_process
::test_process(config_t const& config)
  : process(config)
{
}

test_process
::~test_process()
{
}

extern "C"
{

void VISTK_EXPORT register_processes();

}

static process_t create_test_process(config_t const& config);

void
register_processes()
{
  static process_registry::module_t const module_name = process_registry::module_t("test_processes");

  process_registry_t const registry = process_registry::self();

  if (registry->is_module_loaded(module_name))
  {
    return;
  }

  registry->register_process("test", "A test process", create_test_process);

  registry->mark_module_as_loaded(module_name);
}

process_t
create_test_process(config_t const& config)
{
  return boost::make_shared<test_process>(config);
}<commit_msg>Use the create_process template function<commit_after>/*ckwg +5
 * Copyright 2011-2012 by Kitware, Inc. All Rights Reserved. Please refer to
 * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
 * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
 */

#include <vistk/pipeline/process.h>

#include <vistk/config.h>

#include <boost/make_shared.hpp>

using namespace vistk;

class VISTK_NO_EXPORT test_process
  : public vistk::process
{
  public:
    test_process(config_t const& config);
    ~test_process();
};

test_process
::test_process(config_t const& config)
  : process(config)
{
}

test_process
::~test_process()
{
}

extern "C"
{

void VISTK_EXPORT register_processes();

}

void
register_processes()
{
  static process_registry::module_t const module_name = process_registry::module_t("test_processes");

  process_registry_t const registry = process_registry::self();

  if (registry->is_module_loaded(module_name))
  {
    return;
  }

  registry->register_process("test", "A test process", create_process<test_process>);

  registry->mark_module_as_loaded(module_name);
}
{'fraction_non_alphanumeric': 0.11265822784810127, 'fraction_numerical': 0.01181434599156118, 'mean_word_length': 5.604456824512535, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '5615276', 'n_tokens_mistral': 830, 'n_tokens_neox': 783, 'n_words': 177}