lib/term_extraction/yahoo.rb in term-extraction-0.1.4 vs lib/term_extraction/yahoo.rb in term-extraction-1.0.0

- old
+ new

@@ -1,6 +1,7 @@ require 'nokogiri' +require 'uri' require 'addressable/uri' require 'open-uri' class TermExtraction class Yahoo < TermExtraction @@ -18,13 +19,11 @@ end def uri api_uri = Addressable::URI.parse(gateway) api_uri.query_values = { - 'appid' => @api_key, - 'output' => 'xml', - 'context' => @context + 'q' => "select * from search.termextract where context=\"#{@context}\"" } api_uri end class << self @@ -37,10 +36,10 @@ def ns {'s' => 'urn:yahoo:cate'} end def gateway - 'http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction' + 'http://query.yahooapis.com/v1/public/yql' end def remote_xml begin open(uri).read \ No newline at end of file