Module: Clarification

Defined in:
lib/clarification.rb,
lib/clarification/hit.rb,
lib/clarification/model.rb,
lib/clarification/train.rb,
lib/clarification/client.rb,
lib/clarification/enrich.rb,
lib/clarification/search.rb,
lib/clarification/concept.rb,
lib/clarification/predict.rb,
lib/clarification/version.rb,
lib/clarification/response.rb,
lib/clarification/requester.rb,
lib/clarification/end_points.rb,
lib/clarification/objectifier.rb,
lib/clarification/configuration.rb,
lib/clarification/response/train_response.rb,
lib/clarification/response/search_response.rb,
lib/clarification/requester/train_requester.rb,
lib/clarification/requester/search_requester.rb,
lib/clarification/requester/predict_requester.rb

Defined Under Namespace

Classes: Client, Concept, Configuration, Enrich, Hit, Model, Objectifier, Predict, PredictRequester, Requester, Response, Search, SearchRequester, SearchResponse, Train, TrainRequester, TrainResponse

Constant Summary collapse

VERSION =
"0.3.0"
BASE_URL =
'https://api.clarifai.com/v2/'.freeze
PUBLIC_MODELS =
{
  apparel: 'e0be3b9d6a454f0493ac3a30784001ff',
  celebrity: 'e466caa0619f444ab97497640cefc4dc',
  color: 'eeed0b6733a644cea07cf4c60f87ebb7',
  demographics: 'c0c0ac362b03416da06ab3fa36fb58e3',
  face_detection: 'a403429f2ddf4b49b307e318f00e528b',
  face_embedding: 'd02b4508df58432fbb84e800597b8959',
  focus: 'c2cf7cecd8a6427da375b9f35fcd2381',
  food: 'bd367be194cf45149e75f01d59f77ba7',
  general: 'aaa03c23b3724a16a56b629203edc62c',
  general_embedding: 'bbb5f41425b8468d9b7a554ff10f8581',
  logo: 'c443119bf2ed4da98487520d01a0b1e3',
  moderation: 'd16f390eb32cad478c7ae150069bd2c6',
  nsfw: 'e9576d86d2004ed1a38ba0cf39ecb4b1',
  travel: 'eee28c313d69466f836ab83287a54ed9',
  wedding: 'c386b7a870114f4a87477c0824499348'
}.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration


27
28
29
# File 'lib/clarification.rb', line 27

def configuration
  @configuration
end

Class Method Details

.configure {|self.configuration| ... } ⇒ Object

Yields:


29
30
31
32
# File 'lib/clarification.rb', line 29

def configure
  self.configuration ||= Configuration.new
  yield(self.configuration)
end