yahoo_content_analysis 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5610866e5c197f3deaf637b4a712337d46d28a0
4
- data.tar.gz: 239fe0ae8b71623793b9cd45a601474ea32908ab
3
+ metadata.gz: 2829da5ed5a97092e0d444d816dd8346aebbf65d
4
+ data.tar.gz: 2cb242738359872502237196a5b705f56142968c
5
5
  SHA512:
6
- metadata.gz: 1dcb125e31f5d3d84d81aa3fce40ebdc815c4e37faf087a82009a42d95336286a40dc8eb4e30ea9b5e82db692d2d1bfad434e4d67a780ea550a7f54f3c85cc5a
7
- data.tar.gz: 9952e1c3e2625bf920b36d44fdb35949e8f75f1c0f82ea6be8ec827808448a545f14e731e35a53469082b7e116b6877f7eeae57048b8ff568c8e81826d2de7fc
6
+ metadata.gz: 26744556fa2a07f372d44de07418b271121f37d86dcdb6b69be29a178fd39d0116ce7318de7358be13db867393653ed8ad2ce1ac0cdcfd309790c4e48f7cf0b9
7
+ data.tar.gz: 8527522392fa4541edc4a25304ecf796750bdf138ceee2863df17ea8d053dff089e2f7604f186b31010483fe371f7a4a718f4c9f053b53253a64d9e0a29b982a
@@ -2,3 +2,5 @@ language: ruby
2
2
  rvm:
3
3
  - "2.1.6"
4
4
  - "2.2.1"
5
+ env:
6
+ - TRAVIS=true
data/README.md CHANGED
@@ -3,28 +3,31 @@
3
3
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
4
4
  [![Build Status](https://travis-ci.org/PRX/yahoo_content_analysis.svg?branch=master)](https://travis-ci.org/PRX/yahoo_content_analysis)
5
5
  [![Code Climate](https://codeclimate.com/github/PRX/yahoo_content_analysis/badges/gpa.svg)](https://codeclimate.com/github/PRX/yahoo_content_analysis)
6
- [![Coverage Status](https://coveralls.io/repos/PRX/yahoo_content_analysis/badge.svg?branch=master)](https://coveralls.io/r/PRX/yahoo_content_analysis?branch=master)
6
+ [![Coverage Status](https://coveralls.io/repos/PRX/yahoo_content_analysis/badge.svg?branch=master)](https://coveralls.io/r/PRX/yahoo_content_analysis)
7
7
  [![Dependency Status](https://gemnasium.com/PRX/yahoo_content_analysis.svg)](https://gemnasium.com/PRX/yahoo_content_analysis)
8
8
 
9
9
  Use the Yahoo! Content Analysis API to extract topics and entities.
10
10
 
11
11
  OAuth access is implemented, though not necessary (the docs imply higher limits if requests are signed). This should be a useful example for those wanting to do 2-legged OAuth access to Yahoo APIs using Faraday and the OAuth Faraday Middleware.
12
12
 
13
- N.B. - I am not seeing the additional metadata nor related entities returned as the Yahoo docs claim they should.
13
+ (I am not seeing the additional metadata nor related entities returned as the Yahoo docs claim they should, so YMMV.)
14
14
 
15
15
  ## Installation
16
16
 
17
17
  Add this line to your application's Gemfile:
18
-
18
+ ```ruby
19
19
  gem 'yahoo_content_analysis'
20
+ ```
20
21
 
21
22
  And then execute:
22
-
23
+ ```
23
24
  $ bundle
25
+ ```
24
26
 
25
27
  Or install it yourself as:
26
-
28
+ ```
27
29
  $ gem install yahoo_content_analysis
30
+ ```
28
31
 
29
32
  ## Usage
30
33
  ```ruby
@@ -35,15 +38,15 @@ YahooContentAnalysis.configure{|y|
35
38
  y.api_secret = ENV['YAHOO_API_SECRET']
36
39
  }
37
40
 
38
- r = YahooContentAnalysis::Client.new.analyze('Italian sculptors and painters of the renaissance favored the Virgin Mary for inspiration.')
39
-
40
- names = r.entities.collect{|e| e.name}
41
+ # you can query text
42
+ text = 'Italian sculptors and painters of the renaissance favored the Virgin Mary for inspiration.'
43
+ r = YahooContentAnalysis::Client.new.analyze(text)
44
+ names = r.entities.map { |e| e.name }
41
45
 
42
46
  # you can also query a uri
43
47
  uri = 'http://www.npr.org/2015/06/03/411524156/in-search-of-the-red-cross-500-million-in-haiti-relief'
44
48
  r = YahooContentAnalysis::Client.new.analyze(uri)
45
-
46
- names = r.entities.collect{|e| e.name}
49
+ names = r.entities.map { |e| e.name }
47
50
  ```
48
51
  ## Contributing
49
52
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module YahooContentAnalysis
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.description = %q{Use the Yahoo! Content Analysis API to extract topics and entities.}
12
12
  gem.summary = %q{Use the Yahoo! Content Analysis API to extract topics and entities.}
13
13
  gem.homepage = "https://github.com/PRX/yahoo_content_analysis"
14
+ gem.license = 'MIT'
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_content_analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
@@ -253,7 +253,8 @@ files:
253
253
  - test/test_helper.rb
254
254
  - yahoo_content_analysis.gemspec
255
255
  homepage: https://github.com/PRX/yahoo_content_analysis
256
- licenses: []
256
+ licenses:
257
+ - MIT
257
258
  metadata: {}
258
259
  post_install_message:
259
260
  rdoc_options: []