Sha256: 7ba73232ac1a75d4209c4d1a81d11d4c08784929eb245a26fc67c6a18ba206fe
Contents?: true
Size: 567 Bytes
Versions: 10
Compression:
Stored size: 567 Bytes
Contents
require "calais" module Jkl module Extraction class << self def calais_response(key, text) Calais.process_document( :content => text, :license_id => key ) end def entities(key,text) calais_response(key, text).entities.map{|e| {e.type => [e.attributes["name"]]}} end def tags(key, text) nested_list = {} entities(key,text).each do |a| nested_list = nested_list.merge!(a){ |key,v1,v2| v1+v2 } end nested_list end end end end
Version data entries
10 entries across 10 versions & 1 rubygems