term_extraction 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -1
- data/VERSION.yml +1 -1
- data/lib/term_extraction/yahoo.rb +5 -5
- data/lib/term_extraction/zemanta.rb +2 -2
- data/term_extraction.gemspec +2 -5
- metadata +2 -12
data/Rakefile
CHANGED
@@ -13,7 +13,6 @@ begin
|
|
13
13
|
s.description = "Term extraction library"
|
14
14
|
s.authors = ["alex", "Daniel Huckstep"]
|
15
15
|
s.add_dependency 'crack', ['>= 0.1.6']
|
16
|
-
s.add_dependency 'addressable'
|
17
16
|
end
|
18
17
|
rescue LoadError
|
19
18
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
data/VERSION.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'crack'
|
2
|
-
require 'addressable/uri'
|
3
2
|
require 'open-uri'
|
3
|
+
require 'uri'
|
4
4
|
|
5
5
|
class TermExtraction
|
6
6
|
class Yahoo < TermExtraction
|
@@ -13,12 +13,12 @@ class TermExtraction
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def uri
|
16
|
-
api_uri =
|
17
|
-
api_uri.
|
16
|
+
api_uri = URI.parse(gateway)
|
17
|
+
api_uri.query = {
|
18
18
|
'appid' => @api_key,
|
19
19
|
'output' => 'xml',
|
20
20
|
'context' => @context
|
21
|
-
}
|
21
|
+
}.map { |k,v| "#{URI.escape(k || '')}=#{URI.escape(v || '')}" }.join('&')
|
22
22
|
api_uri
|
23
23
|
end
|
24
24
|
|
@@ -30,7 +30,7 @@ class TermExtraction
|
|
30
30
|
|
31
31
|
private
|
32
32
|
def ns
|
33
|
-
{'s' => 'urn:yahoo:cate'}
|
33
|
+
{ 's' => 'urn:yahoo:cate' }
|
34
34
|
end
|
35
35
|
|
36
36
|
def gateway
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'crack'
|
2
2
|
require 'net/http'
|
3
|
-
require '
|
3
|
+
require 'uri'
|
4
4
|
|
5
5
|
class TermExtraction
|
6
6
|
class Zemanta < TermExtraction
|
@@ -13,7 +13,7 @@ class TermExtraction
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def uri
|
16
|
-
|
16
|
+
URI.parse(gateway)
|
17
17
|
end
|
18
18
|
|
19
19
|
def post_params
|
data/term_extraction.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{term_extraction}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["alex", "Daniel Huckstep"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-07}
|
13
13
|
s.description = %q{Term extraction library}
|
14
14
|
s.email = %q{alexrabarts@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -49,14 +49,11 @@ Gem::Specification.new do |s|
|
|
49
49
|
|
50
50
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
51
51
|
s.add_runtime_dependency(%q<crack>, [">= 0.1.6"])
|
52
|
-
s.add_runtime_dependency(%q<addressable>, [">= 0"])
|
53
52
|
else
|
54
53
|
s.add_dependency(%q<crack>, [">= 0.1.6"])
|
55
|
-
s.add_dependency(%q<addressable>, [">= 0"])
|
56
54
|
end
|
57
55
|
else
|
58
56
|
s.add_dependency(%q<crack>, [">= 0.1.6"])
|
59
|
-
s.add_dependency(%q<addressable>, [">= 0"])
|
60
57
|
end
|
61
58
|
end
|
62
59
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: term_extraction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alex
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2010-02-
|
13
|
+
date: 2010-02-07 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -23,16 +23,6 @@ dependencies:
|
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: 0.1.6
|
25
25
|
version:
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: addressable
|
28
|
-
type: :runtime
|
29
|
-
version_requirement:
|
30
|
-
version_requirements: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: "0"
|
35
|
-
version:
|
36
26
|
description: Term extraction library
|
37
27
|
email: alexrabarts@gmail.com
|
38
28
|
executables: []
|