Sha256: 26b6d7240dc12f147c20b4e26351d6feaba4d781dd73173b3ab5ecf3922b02b5
Contents?: true
Size: 642 Bytes
Versions: 2
Compression:
Stored size: 642 Bytes
Contents
# encoding: UTF-8 require "faraday" require "faraday_middleware" require "json" module Dandelionapi class EntityExtraction < Base ENDPOINT = "/datatxt/nex/v1" attr_accessor :text, :url, :html, :html_fragment, :lang, :min_confidence, :min_length, :social_hashtag, :social_mention, :include, :extra_types, :country, :custom_spots def analyze(options) raise MissingParameters.new("Please provide one of the following parameters: text, url, html or html_fragment") if ([:text, :url, :html, :html_fragment] & options.keys).empty? params = options call(ENDPOINT, params) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dandelionapi-0.0.3 | lib/dandelionapi/entity_extraction.rb |
dandelionapi-0.0.2 | lib/dandelionapi/entity_extraction.rb |