I’m having a bit of a play with SemanticHacker at the moment, seeing what their service thinks of some text I’m poking at it. To make this a bit simpler I created a small ruby lib that wraps their API to make my life a little easier. And hopefully it’ll make someone elses life easier - enjoy.
(It requires hpricot for XML parsing - make sure it’s installed)
sh=SemanticHacker.new("mysecrettoken")sh.get_signature("Wow! Some semantic analysis on my text")putssh.signatures.inspect#returns an array of hashes with the weights and indexes of the categories