<commit_before>
module Coral
module Plugin
class Base < Core
  
  include Mixin::Lookup
  
  #---
  
  # All Plugin classes should directly or indirectly extend Base
  
  def initialize(type, provider, options)
    config = Config.ensure(options)
    name   = Util::Data.ensure_value(config.delete(:name), provider)
       
    set_meta(config.delete(:meta, Config.new))<commit_msg>Cleaning all initialized plugin options in the base plugin class.<commit_after>
module Coral
module Plugin
class Base < Core
  
  include Mixin::Lookup
  
  #---
  
  # All Plugin classes should directly or indirectly extend Base
  
  def initialize(type, provider, options)
    config = Util::Data.clean(Config.ensure(options))
    name   = Util::Data.ensure_value(config.delete(:name), provider)
       
    set_meta(config.delete(:meta, Config.new))
{'fraction_non_alphanumeric': 0.09832134292565947, 'fraction_numerical': 0.0, 'mean_word_length': 3.638888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1980241', 'n_tokens_mistral': 245, 'n_tokens_neox': 238, 'n_words': 68}