josephwilk/rsemantic — pull request #12 by todorus (2013-11-27 20:19:42+00:00)
Title: Rails3

Since I knew what needed to happen to get Rails3 to work with the gem, I could take a more methodical approach. I renamed module names, folders and module file to match convention. This allows me to run the following code within a Rails3 project

documents = ["The cat in the hat disabled",
"A cat is a fine pet ponies. But can you cat the pet cat?",
"Do and cats make good pets.",
"I haven't got a hat."]

#Log to stdout how the matrix gets built and transformed
search = RSemantic::Search.new(documents, verbose: true)

#Find documents that are related to documents[0] with a ranking for how related they are.
puts search.related(0)

This makes me assume that gem functions properly in Rails3.

I've double checked for missing files. According to GiT all files seem to have been renamed except for lib/semantic/transform.rb and lib/semantic/vector_space.rb, which it sees as deleted and readded as lib/rsemantic/transform.rb and lib/rsemantic/vector_space.rb, so as far as I can tell all seems fine.