Ruby Programmer/Developer

George Armhold's Blog

Data-driven webapps built with Ruby, Java & Wicket

Ocarina- Optical Character Recognition for Ruby

I just published a bare-bones implementation of an Optical Character Recognizer implemented in Ruby.

It’s pretty basic, but it does successfully recognize its training set as well as the same characters with added “noise”. It uses a straightforward implementation of a feed-forward neural network.

It uses RMagick/ImageMagick to handle image processing, but apart from that it’s built from scratch!

You can grab a copy of the source from Github.

training images vs input samples

Blog Moved to Github/Octopress

I’m experimenting with Octopress as a potential Wordpress replacement.

I’ve grown tired of trying to properly format code with the Wordpress editor, so I’ve moved my blog from Wordpress (and before that Blogger) to Jekyll + Octopress, hosted on Github.

Let’s see how code formats under Octopress:

print_tree
1
2
3
4
5
6
7
8
9
10
11
  def print_tree(node, indent)

    puts indent + "#{node} -> "

    if node.kind_of? Container
      node.children.each do |child|
        print_tree(child, indent + Control::INDENT)
      end
    end

  end

Beautiful!

Pixlshare-Rebooted

In order to dive into Ruby, I decided to convert Pixlshare from Java+Wicket to Ruby on Rails.

It’s an admittedly small project, but I was surprised how easy it was. I had it basically working in under a day, and polished enough for production use in under 2 days.

But the best part was the code size: a reduction of 6 to 1 going from Java -> Ruby.

pixlshare