class Tweetsentiments::Client

Public Instance Methods

analyze(text, options={}) click to toggle source
# File lib/tweetsentiments/client.rb, line 14
def analyze(text, options={})
  response = get("analyze", options.merge(:text => text))
end
classify(text, options={}) click to toggle source
# File lib/tweetsentiments/client.rb, line 3
def classify(text, options={})
  response = get("classify", options.merge(:text => text))
  {:sentiment=>response["sentiment"], :translated_text=>response["translate_text"].to_s } if response 
end
classify_simple(text, options={}) click to toggle source
# File lib/tweetsentiments/client.rb, line 7
def classify_simple(text, options={})
  response = get("classify_simple", options.merge(:text => text))
  response["value"] if response
end
lang_detect(text, options={}) click to toggle source
# File lib/tweetsentiments/client.rb, line 11
def lang_detect(text, options={})
  response = get("lang/detect", options.merge(:text => text))
end