lib/jkl.rb in jakal-0.2.0 vs lib/jkl.rb in jakal-0.2.1
- old
+ new
@@ -1,10 +1,10 @@
require_relative "jkl/rss_client"
-require_relative "jkl/calais_client"
require_relative "jkl/text_client"
require "mechanize"
+require "term-extract"
module Jkl
class << self
def get(url)
@@ -15,8 +15,12 @@
def links(feed)
links = Jkl::Rss::links(Jkl::Rss::items(Jkl::get(feed)))
links.each do |link|
yield link if block_given?
end
+ end
+
+ def tags(text)
+ TermExtract.extract(text.force_encoding("UTF-8")).keys
end
end
end