Method: NLPCloud::Client#intent_classification

Defined in:
lib/nlpcloud.rb

#intent_classification(text) ⇒ Object



162
163
164
165
166
167
168
# File 'lib/nlpcloud.rb', line 162

def intent_classification(text)
  payload = {
    'text' => text
  }
  response = RestClient.post("#{@root_url}/intent-classification", payload.to_json, @headers)
  JSON.parse(response.body)
end