<commit_before>module Reno
	class Processor
		def self.use_component(package)
			package.state.set_processor(self, true)
		end
		
		def self.link(links)
			links.each_pair do |input, output|
				input.link Node::Link.new(self, output)
			end
		end
		
		def self.merger(*hash)
			hash.last.each_pair do |inputs, targets|
				inputs = Array === inputs ? inputs : [inputs]
				targets = Array === targets ? targets : [targets]
				targets.each do |target|
					link = Node::MergeLink.new(self, target)
					inputs.each do |input|
						input.link link
					end
				end
			end
		end
	end
end<commit_msg>A more flexible linking function for processors.<commit_after>module Reno
	class Processor
		def self.use_component(package)
			package.state.set_processor(self, true)
		end
		
		def self.link(links)
			links.each_pair do |inputs, outputs|
				[*inputs].each do |input|
					[*outputs].each do |output|
						puts "linking #{self} : #{input} to #{output}"
						input.link Node::Link.new(self, output)
					end
				end
			end
		end
		
		def self.merger(*hash)
			hash.last.each_pair do |inputs, targets|
				inputs = Array === inputs ? inputs : [inputs]
				targets = Array === targets ? targets : [targets]
				targets.each do |target|
					link = Node::MergeLink.new(self, target)
					inputs.each do |input|
						input.link link
					end
				end
			end
		end
	end
end
{'fraction_non_alphanumeric': 0.11167883211678832, 'fraction_numerical': 0.0, 'mean_word_length': 2.8838526912181304, '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': '3466732', 'n_tokens_mistral': 578, 'n_tokens_neox': 437, 'n_words': 125}