Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # installation
- gem install openamplify
- # usage
- require 'openamplify'
- API_KEY = "register to get a key"
- client = OpenAmplify::Client.new(:api_key => API_KEY)
- text = "After getting the MX1000 laser mouse and the Z-5500 speakers i fell in love with logitech"
- response = client.analyze_text(text)
- # List all the keys and values returned by OpenAmplify
- response.each do |k, v|
- pp k
- pp v
- end
- # 'response' works like a Hash
- puts response['Topics']
- puts response['Demographics']
Add Comment
Please, Sign In to add comment