Has anyone tried Gabbler yet? [Ruby]

Gabbler is … well I’m quite sure what you’d call this form of machine learning, although I know it’s a supervised process.

The simplest gabbler would be:

# Read in gabbler gem.
require "gabbler"

# Read in specific files.
this_example = File.read("my_example.txt").strip

# Train on example
gabbler.learn(this_example)

# Print training data.
puts gabbler.sentence

But recently I’ve run into a specific error, that seems to think there is a line present that there is not.

Does reading gabbler data as a conditional option cause problems? I mean the only time I’ve ever run into an error with it was today.

Not including obviously the missing data in the above example.


No matter how I arrange the program, I keep getting this error. So the issue must not be on my end, because the same problem works fine in a different folder:

Traceback (most recent call last):
	1: from gabbler.rb:7:in `<main>'
/var/lib/gems/2.5.0/gems/gabbler-0.1.0/lib/gabbler/generator.rb:38:in `sentence': undefined method `[]' for nil:NilClass (NoMethodError)

Ok I think I fixed it, but still if a program has only 28 lines, it there should be no line 38 to get an error from.

Ok figured it out I think. Basically Gabbler isn’t really designed for making decisions, that’s what decision trees are for.

Gabbler is heavily depending not on the program itself, but the structure of the data in the file.

What I’ve determined is Gabbler is designed as an output algorithm, while Decision Tree is design more as an input algorithm, and thus that’s why it’s so hard to make Gabbler make decisions.

1 Like