<commit_before>= Ruby4Knime

Ruby4Knime is a realization of special node types for
http://knime.org that allow to use Ruby scripts for
interactive data analytic.

The main aims of this project are:
* provide possibility to use Ruby language for interactive data analysis;
* make the analysis more effective using clear and laconic Ruby style.

knime.rb is the simple mediator that allows to use KNIME`s classes
written in Java in the Ruby programming style and also use all
Java classes without any changes.

= Simple examples
These samples illustrate how to generate output data from input
data of the node.

== Copy existing rows

  $in_data_0.each do |row|
    $out_data_0 << row
  end<commit_msg>rdoc: added 2x2 example<commit_after>= Ruby4Knime

Ruby4Knime is a realization of special node types for
http://knime.org that allow to use Ruby scripts for
interactive data analytic.

The main aims of this project are:
* provide possibility to use Ruby language for interactive data analysis;
* make the analysis more effective using clear and laconic Ruby style.

knime.rb is the simple mediator that allows to use KNIME`s classes
written in Java in the Ruby programming style and also use all
Java classes without any changes.

= Simple examples
These samples illustrate how to generate output data from input
data of the node.

== Copy existing rows

  $in_data_0.each do |row|
    $out_data_0 << row
  end


== Copy existing rows from all inputs
This example is applicated for Ruby Script 2x2. Note: all inputs
and outputs are accessible by names like $in_data_X, $out_data_X or
by number in appropriate array $output_datatable_arr, $input_datatable_arr.

  (0..1).each do |i|
    out = $output_datatable_arr[i]
    $input_datatable_arr[i].each do |row|
      out << row
    end
  end
{'fraction_non_alphanumeric': 0.048630519843487985, 'fraction_numerical': 0.007825600894354388, 'mean_word_length': 4.203488372093023, 'pattern_counts': {'":': 0, '<': 9, '<?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': '5076868', 'n_tokens_mistral': 510, 'n_tokens_neox': 489, 'n_words': 254}