calais 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,12 @@
1
1
  # Changes
2
2
 
3
+ ## 0.0.12
4
+
5
+ * added relevances to Geographies
6
+ * improved doc
7
+ * removed jeweler dependency and simplified Rakefile
8
+ * bumped rspec requirement
9
+
3
10
  ## 0.0.11
4
11
 
5
12
  * simple fix for some rubies not liking DateTime.parse without including date
data/Gemfile CHANGED
@@ -1,11 +1,3 @@
1
1
  source :gemcutter
2
2
 
3
- gem "rake", "0.8.7"
4
- gem "curb", "0.6.7"
5
- gem "nokogiri"
6
- gem "jeweler"
7
- gem "yard"
8
-
9
- group :test do
10
- gem "rspec"
11
- end
3
+ gemspec
@@ -13,7 +13,7 @@ This is a very basic wrapper to the Open Calais API. It uses the POST endpoint a
13
13
 
14
14
  Calais.enlighten(
15
15
  :content => "The government of the United Kingdom has given corporations like fast food chain McDonald's the right to award high school qualifications to employees who complete a company training program."
16
- :content_type => :text,
16
+ :content_type => :raw,
17
17
  :license_id => 'your license id'
18
18
  )
19
19
 
@@ -23,7 +23,7 @@ If you want to do something more fun like getting all sorts of fun information a
23
23
 
24
24
  Calais.process_document(
25
25
  :content => "The government of the United Kingdom has given corporations like fast food chain McDonald's the right to award high school qualifications to employees who complete a company training program.",
26
- :content_type => :text,
26
+ :content_type => :raw,
27
27
  :license_id => 'your license id'
28
28
  )
29
29
 
@@ -47,4 +47,5 @@ You can install the Calais gem via Rubygems (`gem install calais`) or by buildin
47
47
  ## Acknowledgements ##
48
48
 
49
49
  * [Paul Legato](http://www.economaton.com/): Help all around with the new response processor and implementation of the 3.1 API.
50
- * [Ryan Ong][http://www.ryanong.net/]
50
+ * [Ryan Ong](http://www.ryanong.net/)
51
+ * [Juan Antonio Chavez](https://github.com/TheNaoX): Geographies relevance
data/Rakefile CHANGED
@@ -6,43 +6,9 @@ require 'rake/clean'
6
6
  require './lib/calais.rb'
7
7
 
8
8
  begin
9
- gem 'jeweler', '>= 1.0.1'
10
- require 'jeweler'
9
+ require 'rspec/core/rake_task'
11
10
 
12
- Jeweler::Tasks.new do |s|
13
- s.name = 'calais'
14
- s.summary = 'A Ruby interface to the Calais Web Service'
15
- s.email = 'info@opensynapse.net'
16
- s.homepage = 'http://github.com/abhay/calais'
17
- s.description = 'A Ruby interface to the Calais Web Service'
18
- s.authors = ['Abhay Kumar']
19
- s.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*"]
20
- s.rubyforge_project = 'calais'
21
- s.add_dependency 'nokogiri', '>= 1.3.3'
22
- s.add_dependency 'json', '>= 1.1.3'
23
- s.add_dependency 'curb', '>= 0.1.4'
24
- end
25
- rescue LoadError
26
- puts "Jeweler, or one of its dependencies, is not available. Please install it."
27
- exit(1)
28
- end
29
-
30
- begin
31
- require 'spec/rake/spectask'
32
-
33
- desc "Run all specs"
34
- Spec::Rake::SpecTask.new do |t|
35
- t.spec_files = FileList["spec/**/*_spec.rb"].sort
36
- t.spec_opts = ["--options", "spec/spec.opts"]
37
- end
38
-
39
- desc "Run all specs and get coverage statistics"
40
- Spec::Rake::SpecTask.new('coverage') do |t|
41
- t.spec_opts = ["--options", "spec/spec.opts"]
42
- t.spec_files = FileList["spec/*_spec.rb"].sort
43
- t.rcov_opts = ["--exclude", "spec", "--exclude", "gems"]
44
- t.rcov = true
45
- end
11
+ RSpec::Core::RakeTask.new(:spec)
46
12
 
47
13
  task :default => :spec
48
14
  rescue LoadError
@@ -67,31 +33,4 @@ rescue LoadError
67
33
  exit(1)
68
34
  end
69
35
 
70
- begin
71
- require 'rake/contrib/sshpublisher'
72
- namespace :rubyforge do
73
-
74
- desc "Release gem and RDoc documentation to RubyForge"
75
- task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
76
-
77
- namespace :release do
78
- desc "Publish RDoc to RubyForge."
79
- task :docs => [:yardoc] do
80
- config = YAML.load(
81
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
82
- )
83
-
84
- host = "#{config['username']}@rubyforge.org"
85
- remote_dir = "/var/www/gforge-projects/calais/"
86
- local_dir = 'doc'
87
-
88
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
89
- end
90
- end
91
- end
92
- rescue LoadError
93
- puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
94
- exit(1)
95
- end
96
-
97
36
  # vim: syntax=Ruby
@@ -1,5 +1,6 @@
1
1
  require 'digest/sha1'
2
2
  require 'net/http'
3
+ require 'uri'
3
4
  require 'cgi'
4
5
  require 'iconv'
5
6
  require 'set'
@@ -8,7 +9,6 @@ require 'date'
8
9
  require 'rubygems'
9
10
  require 'nokogiri'
10
11
  require 'json'
11
- require 'curb'
12
12
 
13
13
  if RUBY_VERSION.to_f < 1.9
14
14
  $KCODE = "UTF8"
@@ -27,13 +27,7 @@ module Calais
27
27
  "paramsXML" => params_xml
28
28
  }
29
29
 
30
- @client ||= Curl::Easy.new
31
- @client.url = @use_beta ? BETA_REST_ENDPOINT : REST_ENDPOINT
32
- @client.timeout = HTTP_TIMEOUT
33
-
34
- post_fields = post_args.map {|k,v| Curl::PostField.content(k, v) }
35
-
36
- do_request(post_fields)
30
+ do_request(post_args)
37
31
  end
38
32
 
39
33
  def params_xml
@@ -73,6 +67,10 @@ module Calais
73
67
  params_node.to_xml(:indent => 2)
74
68
  end
75
69
 
70
+ def url
71
+ @url ||= URI.parse(calais_endpoint)
72
+ end
73
+
76
74
  private
77
75
  def check_params
78
76
  raise 'missing content' if @content.nil? || @content.empty?
@@ -103,11 +101,13 @@ module Calais
103
101
  end
104
102
 
105
103
  def do_request(post_fields)
106
- unless @client.http_post(post_fields)
107
- raise 'unable to post to api endpoint'
108
- end
104
+ @request ||= Net::HTTP::Post.new(url.path)
105
+ @request.set_form_data(post_fields)
106
+ Net::HTTP.new(url.host, url.port).start {|http| http.request(@request)}.body
107
+ end
109
108
 
110
- @client.body_str
109
+ def calais_endpoint
110
+ @use_beta ? BETA_REST_ENDPOINT : REST_ENDPOINT
111
111
  end
112
112
  end
113
- end
113
+ end
@@ -13,7 +13,7 @@ module Calais
13
13
  }
14
14
 
15
15
  attr_accessor :submitter_code, :signature, :language, :submission_date, :request_id, :doc_title, :doc_date
16
- attr_accessor :hashes, :entities, :relations, :geographies, :categories, :socialtags
16
+ attr_accessor :hashes, :entities, :relations, :geographies, :categories, :socialtags, :relevances
17
17
 
18
18
  def initialize(rdf_string)
19
19
  @raw_response = rdf_string
@@ -38,7 +38,7 @@ module Calais
38
38
  end
39
39
 
40
40
  class Geography
41
- attr_accessor :name, :calais_hash, :attributes
41
+ attr_accessor :name, :calais_hash, :attributes, :relevance
42
42
  end
43
43
 
44
44
  class Category
@@ -173,6 +173,7 @@ module Calais
173
173
  geography.name = attributes.delete('name')
174
174
  geography.calais_hash = attributes.delete('subject')
175
175
  geography.attributes = attributes
176
+ geography.relevance = extract_relevance(geography.calais_hash.value)
176
177
 
177
178
  node.remove
178
179
  geography
@@ -212,5 +213,8 @@ module Calais
212
213
  hsh.merge(node.name => value)
213
214
  end
214
215
  end
216
+ def extract_relevance(value)
217
+ return @relevances[value]
218
+ end
215
219
  end
216
- end
220
+ end
@@ -0,0 +1,3 @@
1
+ module Calais
2
+ VERSION = "0.0.12"
3
+ end
@@ -66,7 +66,7 @@ describe Calais::Client, :enlighten do
66
66
  it 'provides access to the enlighten command on the generic rest endpoint' do
67
67
  @client.should_receive(:do_request).with(anything).and_return(SAMPLE_RESPONSE)
68
68
  @client.enlighten
69
- @client.instance_variable_get(:@client).url.should == Calais::REST_ENDPOINT
69
+ @client.url.should == URI.parse(Calais::REST_ENDPOINT)
70
70
  end
71
71
 
72
72
  it 'provides access to the enlighten command on the beta rest endpoint' do
@@ -74,6 +74,6 @@ describe Calais::Client, :enlighten do
74
74
 
75
75
  @client.should_receive(:do_request).with(anything).and_return(SAMPLE_RESPONSE)
76
76
  @client.enlighten
77
- @client.instance_variable_get(:@client).url.should == Calais::BETA_REST_ENDPOINT
77
+ @client.url.should == URI.parse(Calais::BETA_REST_ENDPOINT)
78
78
  end
79
79
  end
@@ -39,9 +39,21 @@ describe Calais::Response, :new do
39
39
  relations.map { |e| e.type }.sort.uniq.should == %w[GenericRelations PersonAttributes PersonCareer Quotation]
40
40
  end
41
41
 
42
- it 'should extract geographies' do
43
- geographies = @response.geographies
44
- geographies.map { |e| e.name }.sort.uniq.should == %w[Australia Hobart,Tasmania,Australia Tasmania,Australia]
42
+ describe 'geographies' do
43
+ it 'should be extracted' do
44
+ geographies = @response.geographies
45
+ geographies.map { |e| e.name }.sort.uniq.should == %w[Australia Hobart,Tasmania,Australia Tasmania,Australia]
46
+ end
47
+
48
+ it 'should have relevance' do
49
+ geographies = @response.geographies
50
+ geographies.map { |e| e.relevance }.sort.uniq.should be_true
51
+ end
52
+
53
+ it 'should have relevance value' do
54
+ geographies = @response.geographies
55
+ geographies.map { |e| e.relevance }.sort.uniq.should == [0.168, 0.718]
56
+ end
45
57
  end
46
58
 
47
59
  it 'should extract relevances' do
@@ -134,4 +146,4 @@ describe Calais::Response, :new do
134
146
  rel.instances.first.offset.should == 425
135
147
  rel.instances.first.length.should == 99
136
148
  end
137
- end
149
+ end
@@ -0,0 +1,538 @@
1
+ {
2
+ "doc":{
3
+ "info":{
4
+ "document":"<document>\n<id>57831</id>\n<title>Record number of bicycles sold in Australia in 2006</title>\n<date>January 4, 2007</date>\n<body>\nBicycle sales in Australia have recorded record sales of 1,273,781 units for 2006, exceeding car sales by 32 percent. It is the fifth year in a row that the bicycle industry has sold more than one million units, a figure yet to be realised by car manufacturers.\n\nThe Cycling Promotion Fund (CPF) spokesman Ian Christie said Australians were increasingly using bicycles as an alternative to cars. Sales rose nine percent in 2006 while the car market stalled. Mr Christie said people were looking to cut their fuel costs and improve their fitness.\n\nMr Christie, a native of Hobart, Tasmania said organisations were beginning to supply bicycles as a company vehicle. \"There is an emerging trend towards people using bikes as their official company-supplied vehicle in place of the traditional company car,\" he said.\n\n\"Some of Australia's biggest corporations now have bicycle fleets, and when you add in government organisations, we now know of at least 50 organisations which operate fleets of bikes.\"\n\n\"Although the company bicycle is a long way from taking over from the company car, it's an important trend when you consider that nearly half of all cars sold are to company fleets.\"\n\nThe CPF claims most commutes to work are less than 5 kilometres (3 miles) making bicycle travel a viable alternative.\n\n</body></document>",
5
+ "docTitle":"Record number of bicycles sold in Australia in 2006",
6
+ "docDate":"2007-01-04 00:00:00",
7
+ "allowDistribution":"true",
8
+ "allowSearch":"true",
9
+ "calaisRequestID":"ede182ab-a3fc-4e96-9838-5fa73bccdea6",
10
+ "docRDFaccessible":"true",
11
+ "id":"http://id.opencalais.com/FYP3OZuxbUDyQEO42uKnqw"
12
+ },
13
+ "meta":{
14
+ "submitterCode":"4a388fbc-9897-def9-9233-efddbfbca363",
15
+ "signature":"digestalg-1|HhYSdHZifSUYvKGZpRu2xeoWlFE=|MPNwpbXJkJipQDb1lqyd/+X+Jd02mmtoCsOdLyLLTVCz0hKKBgDlOA==",
16
+ "contentType":"text/xml",
17
+ "emVer":"UserVocabulariesIM",
18
+ "langIdVer":"DefaultLangId",
19
+ "language":"English",
20
+ "processingVer":"CalaisJob01",
21
+ "submissionDate":"2009-06-08 16:29:07.040",
22
+ "messages":[
23
+
24
+ ]
25
+ }
26
+ },
27
+ "http://d.opencalais.com/dochash-1/9359fafb-1158-3343-91e3-7f4ed89f3b01/cat/1":{
28
+ "_typeGroup":"topics",
29
+ "category":"http://d.opencalais.com/cat/Calais/BusinessFinance",
30
+ "classifierName":"Calais",
31
+ "categoryName":"Business_Finance",
32
+ "score":0.916
33
+ },
34
+ "http://d.opencalais.com/dochash-1/9359fafb-1158-3343-91e3-7f4ed89f3b01/cat/2":{
35
+ "_typeGroup":"topics",
36
+ "category":"http://d.opencalais.com/cat/Calais/TechnologyInternet",
37
+ "classifierName":"Calais",
38
+ "categoryName":"Technology_Internet",
39
+ "score":0.736
40
+ },
41
+ "http://d.opencalais.com/genericHasher-1/84a34c48-25ac-327f-a805-7b81fd570f7d":{
42
+ "_type":"Country",
43
+ "_typeGroup":"entities",
44
+ "name":"Australia",
45
+ "instances":[
46
+ {
47
+ "detection":"[number of bicycles sold in ]Australia[ in 2006</title>\n<date>January 4,]",
48
+ "prefix":"number of bicycles sold in ",
49
+ "exact":"Australia",
50
+ "suffix":" in 2006</title>\n<date>January 4,",
51
+ "offset":67,
52
+ "length":9
53
+ },
54
+ {
55
+ "detection":"[4, 2007</date>\n<body>\nBicycle sales in ]Australia[ have recorded record sales of 1,273,781 units]",
56
+ "prefix":"4, 2007</date>\n<body>\nBicycle sales in ",
57
+ "exact":"Australia",
58
+ "suffix":" have recorded record sales of 1,273,781 units",
59
+ "offset":146,
60
+ "length":9
61
+ },
62
+ {
63
+ "detection":"[ the traditional company car,\" he said.\n\n\"Some of ]Australia['s biggest corporations now have bicycle fleets,]",
64
+ "prefix":" the traditional company car,\" he said.\n\n\"Some of ",
65
+ "exact":"Australia",
66
+ "suffix":"'s biggest corporations now have bicycle fleets,",
67
+ "offset":952,
68
+ "length":9
69
+ }
70
+ ],
71
+ "relevance":0.718,
72
+ "resolutions":[
73
+ {
74
+ "name":"Australia",
75
+ "shortname":"Australia",
76
+ "latitude":"-32.3456225086",
77
+ "longitude":"141.434598022"
78
+ }
79
+ ]
80
+ },
81
+ "http://d.opencalais.com/genericHasher-1/9853f11e-5efa-3efc-90b9-0d0450f7d673":{
82
+ "_type":"Organization",
83
+ "_typeGroup":"entities",
84
+ "name":"Cycling Promotion Fund",
85
+ "organizationtype":"N/A",
86
+ "nationality":"N/A",
87
+ "instances":[
88
+ {
89
+ "detection":"[yet to be realised by car manufacturers.\n\nThe ]Cycling Promotion Fund[ (CPF) spokesman Ian Christie said Australians]",
90
+ "prefix":"yet to be realised by car manufacturers.\n\nThe ",
91
+ "exact":"Cycling Promotion Fund",
92
+ "suffix":" (CPF) spokesman Ian Christie said Australians",
93
+ "offset":396,
94
+ "length":22
95
+ },
96
+ {
97
+ "detection":"[car manufacturers.\n\nThe Cycling Promotion Fund (]CPF[) spokesman Ian Christie said Australians were]",
98
+ "prefix":"car manufacturers.\n\nThe Cycling Promotion Fund (",
99
+ "exact":"CPF",
100
+ "suffix":") spokesman Ian Christie said Australians were",
101
+ "offset":420,
102
+ "length":3
103
+ },
104
+ {
105
+ "detection":"[of all cars sold are to company fleets.\"\n\nThe ]CPF[ claims most commutes to work are less than 5]",
106
+ "prefix":"of all cars sold are to company fleets.\"\n\nThe ",
107
+ "exact":"CPF",
108
+ "suffix":" claims most commutes to work are less than 5",
109
+ "offset":1318,
110
+ "length":3
111
+ }
112
+ ],
113
+ "relevance":0.506,
114
+ "resolutions":[
115
+
116
+ ]
117
+ },
118
+ "http://d.opencalais.com/genericHasher-1/d0ca04b6-9cf5-3595-ad4b-7758a0b57997":{
119
+ "_type":"ProvinceOrState",
120
+ "_typeGroup":"entities",
121
+ "name":"Tasmania",
122
+ "instances":[
123
+ {
124
+ "detection":"[ their fitness.\n\nMr Christie, a native of Hobart, ]Tasmania[ said organisations were beginning to supply]",
125
+ "prefix":" their fitness.\n\nMr Christie, a native of Hobart, ",
126
+ "exact":"Tasmania",
127
+ "suffix":" said organisations were beginning to supply",
128
+ "offset":709,
129
+ "length":8
130
+ }
131
+ ],
132
+ "relevance":0.168,
133
+ "resolutions":[
134
+ {
135
+ "name":"Tasmania,Australia",
136
+ "shortname":"Tasmania",
137
+ "containedbycountry":"Australia",
138
+ "latitude":"-42",
139
+ "longitude":"147"
140
+ }
141
+ ]
142
+ },
143
+ "http://d.opencalais.com/genericHasher-1/4883e991-e7a0-3881-8e5a-b23ede61544e":{
144
+ "_type":"Quotation",
145
+ "_typeGroup":"relations",
146
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
147
+ "quote":"There is an emerging trend towards people using bikes as their official company-supplied vehicle in place of the traditional company car; Some of Australia's biggest corporations now have bicycle fleets, and when you add in government organisations, we now know of at least 50 organisations which operate fleets of bikes.",
148
+ "instances":[
149
+ {
150
+ "detection":"[to supply bicycles as a company vehicle. ]\"There is an emerging trend towards people using bikes as their official company-supplied vehicle in place of the traditional company car,\" he said.\n\n\"Some of Australia's biggest corporations now have bicycle fleets, and when you add in government organisations, we now know of at least 50 organisations which operate fleets of bikes.\"[\n\n\"Although the company bicycle is a long way]",
151
+ "prefix":"to supply bicycles as a company vehicle. ",
152
+ "exact":"\"There is an emerging trend towards people using bikes as their official company-supplied vehicle in place of the traditional company car,\" he said.\n\n\"Some of Australia's biggest corporations now have bicycle fleets, and when you add in government organisations, we now know of at least 50 organisations which operate fleets of bikes.\"",
153
+ "suffix":"\n\n\"Although the company bicycle is a long way",
154
+ "offset":793,
155
+ "length":335
156
+ }
157
+ ]
158
+ },
159
+ "http://d.opencalais.com/genericHasher-1/0c3d5340-106f-390e-92d3-a4aa18004fb8":{
160
+ "_type":"IndustryTerm",
161
+ "_typeGroup":"entities",
162
+ "name":"company car",
163
+ "instances":[
164
+ {
165
+ "detection":"[company-supplied vehicle in place of the ]traditional company car[,\" he said.\n\n\"Some of Australia's biggest]",
166
+ "prefix":"company-supplied vehicle in place of the ",
167
+ "exact":"traditional company car",
168
+ "suffix":",\" he said.\n\n\"Some of Australia's biggest",
169
+ "offset":907,
170
+ "length":23
171
+ },
172
+ {
173
+ "detection":"[bicycle is a long way from taking over from the ]company car[, it's an important trend when you consider that]",
174
+ "prefix":"bicycle is a long way from taking over from the ",
175
+ "exact":"company car",
176
+ "suffix":", it's an important trend when you consider that",
177
+ "offset":1200,
178
+ "length":11
179
+ }
180
+ ],
181
+ "relevance":0.186,
182
+ "resolutions":[
183
+
184
+ ]
185
+ },
186
+ "http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21":{
187
+ "_type":"Person",
188
+ "_typeGroup":"entities",
189
+ "name":"Ian Christie",
190
+ "persontype":"political",
191
+ "nationality":"N/A",
192
+ "instances":[
193
+ {
194
+ "detection":"[Cycling Promotion Fund (CPF) spokesman ]Ian Christie[ said Australians were increasingly using]",
195
+ "prefix":"Cycling Promotion Fund (CPF) spokesman ",
196
+ "exact":"Ian Christie",
197
+ "suffix":" said Australians were increasingly using",
198
+ "offset":435,
199
+ "length":12
200
+ },
201
+ {
202
+ "detection":"[percent in 2006 while the car market stalled. ]Mr Christie[ said people were looking to cut their fuel costs]",
203
+ "prefix":"percent in 2006 while the car market stalled. ",
204
+ "exact":"Mr Christie",
205
+ "suffix":" said people were looking to cut their fuel costs",
206
+ "offset":587,
207
+ "length":11
208
+ },
209
+ {
210
+ "detection":"[ cut their fuel costs and improve their fitness.\n\n]Mr Christie[, a native of Hobart, Tasmania said organisations]",
211
+ "prefix":" cut their fuel costs and improve their fitness.\n\n",
212
+ "exact":"Mr Christie",
213
+ "suffix":", a native of Hobart, Tasmania said organisations",
214
+ "offset":676,
215
+ "length":11
216
+ },
217
+ {
218
+ "detection":"[in place of the traditional company car,\" ]he[ said.\n\n\"Some of Australia's biggest corporations]",
219
+ "prefix":"in place of the traditional company car,\" ",
220
+ "exact":"he",
221
+ "suffix":" said.\n\n\"Some of Australia's biggest corporations",
222
+ "offset":933,
223
+ "length":2
224
+ }
225
+ ],
226
+ "relevance":0.568,
227
+ "resolutions":[
228
+
229
+ ]
230
+ },
231
+ "http://d.opencalais.com/genericHasher-1/aad05e63-b79e-33cc-9c1a-385b47072694":{
232
+ "_type":"Quotation",
233
+ "_typeGroup":"relations",
234
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
235
+ "quote":"people were looking to cut their fuel costs and improve their fitness",
236
+ "instances":[
237
+ {
238
+ "detection":"[percent in 2006 while the car market stalled. ]Mr Christie said people were looking to cut their fuel costs and improve their fitness.[\n\nMr Christie, a native of Hobart, Tasmania said]",
239
+ "prefix":"percent in 2006 while the car market stalled. ",
240
+ "exact":"Mr Christie said people were looking to cut their fuel costs and improve their fitness.",
241
+ "suffix":"\n\nMr Christie, a native of Hobart, Tasmania said",
242
+ "offset":587,
243
+ "length":87
244
+ }
245
+ ]
246
+ },
247
+ "http://d.opencalais.com/genericHasher-1/17126376-4538-3f7d-b31d-bcb2c6472493":{
248
+ "_type":"Position",
249
+ "_typeGroup":"entities",
250
+ "name":"spokesman ",
251
+ "instances":[
252
+ {
253
+ "detection":"[ manufacturers.\n\nThe Cycling Promotion Fund (CPF) ]spokesman[ Ian Christie said Australians were increasingly]",
254
+ "prefix":" manufacturers.\n\nThe Cycling Promotion Fund (CPF) ",
255
+ "exact":"spokesman",
256
+ "suffix":" Ian Christie said Australians were increasingly",
257
+ "offset":425,
258
+ "length":9
259
+ }
260
+ ],
261
+ "relevance":0.275,
262
+ "resolutions":[
263
+
264
+ ]
265
+ },
266
+ "http://d.opencalais.com/genericHasher-1/79d73227-2f18-3014-8dc6-81a29851ea5d":{
267
+ "_type":"GenericRelations",
268
+ "_typeGroup":"relations",
269
+ "verb":"realize",
270
+ "relationsubject":"http://d.opencalais.com/genericHasher-1/ed0e83f9-87e8-3da6-ab46-cd6be116357c",
271
+ "relationobject":"a figure",
272
+ "instances":[
273
+ {
274
+ "detection":"[industry has sold more than one million units, ]a figure yet to be realised by car manufacturers[.\n\nThe Cycling Promotion Fund (CPF) spokesman Ian]",
275
+ "prefix":"industry has sold more than one million units, ",
276
+ "exact":"a figure yet to be realised by car manufacturers",
277
+ "suffix":".\n\nThe Cycling Promotion Fund (CPF) spokesman Ian",
278
+ "offset":341,
279
+ "length":48
280
+ }
281
+ ]
282
+ },
283
+ "http://d.opencalais.com/genericHasher-1/d2bc3216-c3e9-33ee-bb14-675cd80e00ce":{
284
+ "_type":"Quotation",
285
+ "_typeGroup":"relations",
286
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
287
+ "quote":"Although the company bicycle is a long way from taking over from the company car, it's an important trend when you consider that nearly half of all cars sold are to company fleets.",
288
+ "instances":[
289
+ {
290
+ "detection":"[organisations which operate fleets of bikes.\"\n\n]\"Although the company bicycle is a long way from taking over from the company car, it's an important trend when you consider that nearly half of all cars sold are to company fleets.\"[\n\nThe CPF claims most commutes to work are less]",
291
+ "prefix":"organisations which operate fleets of bikes.\"\n\n",
292
+ "exact":"\"Although the company bicycle is a long way from taking over from the company car, it's an important trend when you consider that nearly half of all cars sold are to company fleets.\"",
293
+ "suffix":"\n\nThe CPF claims most commutes to work are less",
294
+ "offset":1130,
295
+ "length":182
296
+ }
297
+ ]
298
+ },
299
+ "http://d.opencalais.com/genericHasher-1/8f3936d9-cf6b-37fc-ae0d-a145959ae3b5":{
300
+ "_type":"GenericRelations",
301
+ "_typeGroup":"relations",
302
+ "verb":"say",
303
+ "relationsubject":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
304
+ "relationobject":"Australians were increasingly using bicycles as an alternative to cars",
305
+ "instances":[
306
+ {
307
+ "detection":"[ manufacturers.\n\nThe Cycling Promotion Fund (CPF) ]spokesman Ian Christie said Australians were increasingly using bicycles as an alternative to cars.[ Sales rose nine percent in 2006 while the car]",
308
+ "prefix":" manufacturers.\n\nThe Cycling Promotion Fund (CPF) ",
309
+ "exact":"spokesman Ian Christie said Australians were increasingly using bicycles as an alternative to cars.",
310
+ "suffix":" Sales rose nine percent in 2006 while the car",
311
+ "offset":425,
312
+ "length":99
313
+ }
314
+ ]
315
+ },
316
+ "http://d.opencalais.com/genericHasher-1/9fa3fb8a-f517-32c7-8a46-3c1506ea3a70":{
317
+ "_type":"City",
318
+ "_typeGroup":"entities",
319
+ "name":"Hobart",
320
+ "instances":[
321
+ {
322
+ "detection":"[ improve their fitness.\n\nMr Christie, a native of ]Hobart[, Tasmania said organisations were beginning to]",
323
+ "prefix":" improve their fitness.\n\nMr Christie, a native of ",
324
+ "exact":"Hobart",
325
+ "suffix":", Tasmania said organisations were beginning to",
326
+ "offset":701,
327
+ "length":6
328
+ }
329
+ ],
330
+ "relevance":0.168,
331
+ "resolutions":[
332
+ {
333
+ "name":"Hobart,Tasmania,Australia",
334
+ "shortname":"Hobart",
335
+ "containedbystate":"Tasmania",
336
+ "containedbycountry":"Australia",
337
+ "latitude":"-42.8806",
338
+ "longitude":"147.325"
339
+ }
340
+ ]
341
+ },
342
+ "http://d.opencalais.com/genericHasher-1/acc62eba-98d2-3481-9e2c-fb775f7e01f3":{
343
+ "_type":"GenericRelations",
344
+ "_typeGroup":"relations",
345
+ "verb":"say",
346
+ "relationsubject":"http://d.opencalais.com/genericHasher-1/d0ca04b6-9cf5-3595-ad4b-7758a0b57997",
347
+ "relationobject":"organisations were beginning to supply bicycles as a company vehicle",
348
+ "instances":[
349
+ {
350
+ "detection":"[ their fitness.\n\nMr Christie, a native of Hobart, ]Tasmania said organisations were beginning to supply bicycles as a company vehicle.[ \"There is an emerging trend towards people using]",
351
+ "prefix":" their fitness.\n\nMr Christie, a native of Hobart, ",
352
+ "exact":"Tasmania said organisations were beginning to supply bicycles as a company vehicle.",
353
+ "suffix":" \"There is an emerging trend towards people using",
354
+ "offset":709,
355
+ "length":83
356
+ }
357
+ ]
358
+ },
359
+ "http://d.opencalais.com/genericHasher-1/d12ca52d-e0ec-3458-839d-4b6a69d3db33":{
360
+ "_type":"PersonCareer",
361
+ "_typeGroup":"relations",
362
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
363
+ "position":"http://d.opencalais.com/genericHasher-1/17126376-4538-3f7d-b31d-bcb2c6472493",
364
+ "organization":"http://d.opencalais.com/genericHasher-1/9853f11e-5efa-3efc-90b9-0d0450f7d673",
365
+ "careertype":"professional",
366
+ "status":"current",
367
+ "instances":[
368
+ {
369
+ "detection":"[yet to be realised by car manufacturers.\n\nThe ]Cycling Promotion Fund (CPF) spokesman Ian Christie[ said Australians were increasingly using]",
370
+ "prefix":"yet to be realised by car manufacturers.\n\nThe ",
371
+ "exact":"Cycling Promotion Fund (CPF) spokesman Ian Christie",
372
+ "suffix":" said Australians were increasingly using",
373
+ "offset":396,
374
+ "length":51
375
+ }
376
+ ]
377
+ },
378
+ "http://d.opencalais.com/genericHasher-1/ed0e83f9-87e8-3da6-ab46-cd6be116357c":{
379
+ "_type":"IndustryTerm",
380
+ "_typeGroup":"entities",
381
+ "name":"car manufacturers",
382
+ "instances":[
383
+ {
384
+ "detection":"[million units, a figure yet to be realised by ]car manufacturers[.\n\nThe Cycling Promotion Fund (CPF) spokesman Ian]",
385
+ "prefix":"million units, a figure yet to be realised by ",
386
+ "exact":"car manufacturers",
387
+ "suffix":".\n\nThe Cycling Promotion Fund (CPF) spokesman Ian",
388
+ "offset":372,
389
+ "length":17
390
+ }
391
+ ],
392
+ "relevance":0.303,
393
+ "resolutions":[
394
+
395
+ ]
396
+ },
397
+ "http://d.opencalais.com/genericHasher-1/e05f3d33-1622-3172-836c-b48637a156d3":{
398
+ "_type":"Continent",
399
+ "_typeGroup":"entities",
400
+ "name":"Australia",
401
+ "instances":[
402
+ {
403
+ "detection":"[number of bicycles sold in ]Australia[ in 2006</title>\n<date>January 4,]",
404
+ "prefix":"number of bicycles sold in ",
405
+ "exact":"Australia",
406
+ "suffix":" in 2006</title>\n<date>January 4,",
407
+ "offset":67,
408
+ "length":9
409
+ }
410
+ ],
411
+ "relevance":0.328,
412
+ "resolutions":[
413
+
414
+ ]
415
+ },
416
+ "http://d.opencalais.com/genericHasher-1/0bb9cdb4-3cb7-342a-9901-6d1f12b32f6a":{
417
+ "_type":"IndustryTerm",
418
+ "_typeGroup":"entities",
419
+ "name":"car sales",
420
+ "instances":[
421
+ {
422
+ "detection":"[sales of 1,273,781 units for 2006, exceeding ]car sales[ by 32 percent. It is the fifth year in a row]",
423
+ "prefix":"sales of 1,273,781 units for 2006, exceeding ",
424
+ "exact":"car sales",
425
+ "suffix":" by 32 percent. It is the fifth year in a row",
426
+ "offset":222,
427
+ "length":9
428
+ }
429
+ ],
430
+ "relevance":0.322,
431
+ "resolutions":[
432
+
433
+ ]
434
+ },
435
+ "http://d.opencalais.com/genericHasher-1/3979e581-0823-3e84-9257-1ca36db4665e":{
436
+ "_type":"IndustryTerm",
437
+ "_typeGroup":"entities",
438
+ "name":"car market",
439
+ "instances":[
440
+ {
441
+ "detection":"[cars. Sales rose nine percent in 2006 while the ]car market[ stalled. Mr Christie said people were looking to]",
442
+ "prefix":"cars. Sales rose nine percent in 2006 while the ",
443
+ "exact":"car market",
444
+ "suffix":" stalled. Mr Christie said people were looking to",
445
+ "offset":567,
446
+ "length":10
447
+ }
448
+ ],
449
+ "relevance":0.254,
450
+ "resolutions":[
451
+
452
+ ]
453
+ },
454
+ "http://d.opencalais.com/genericHasher-1/c2ec763e-020f-3efa-91da-943e6eaae794":{
455
+ "_type":"Quotation",
456
+ "_typeGroup":"relations",
457
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
458
+ "quote":"organisations were beginning to supply bicycles as a company vehicle",
459
+ "instances":[
460
+ {
461
+ "detection":"[ cut their fuel costs and improve their fitness.\n\n]Mr Christie, a native of Hobart, Tasmania said organisations were beginning to supply bicycles as a company vehicle.[ \"There is an emerging trend towards people using]",
462
+ "prefix":" cut their fuel costs and improve their fitness.\n\n",
463
+ "exact":"Mr Christie, a native of Hobart, Tasmania said organisations were beginning to supply bicycles as a company vehicle.",
464
+ "suffix":" \"There is an emerging trend towards people using",
465
+ "offset":676,
466
+ "length":116
467
+ }
468
+ ]
469
+ },
470
+ "http://d.opencalais.com/genericHasher-1/c02271aa-0d63-3f49-89ba-9ebdd5cbd0ee":{
471
+ "_type":"PersonAttributes",
472
+ "_typeGroup":"relations",
473
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
474
+ "birthplace":"Hobart",
475
+ "birthplacetype":"City",
476
+ "gender":"M",
477
+ "instances":[
478
+ {
479
+ "detection":"[ cut their fuel costs and improve their fitness.\n\n]Mr Christie, a native of Hobart, Tasmania[ said organisations were beginning to supply]",
480
+ "prefix":" cut their fuel costs and improve their fitness.\n\n",
481
+ "exact":"Mr Christie, a native of Hobart, Tasmania",
482
+ "suffix":" said organisations were beginning to supply",
483
+ "offset":676,
484
+ "length":41
485
+ }
486
+ ]
487
+ },
488
+ "http://d.opencalais.com/genericHasher-1/d0dd2309-76eb-3679-a37f-edcfcb30513d":{
489
+ "_type":"Quotation",
490
+ "_typeGroup":"relations",
491
+ "person":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
492
+ "persondescription":"spokesman, Cycling Promotion Fund",
493
+ "quote":"Australians were increasingly using bicycles as an alternative to cars",
494
+ "instances":[
495
+ {
496
+ "detection":"[ figure yet to be realised by car manufacturers.\n\n]The Cycling Promotion Fund (CPF) spokesman Ian Christie said Australians were increasingly using bicycles as an alternative to cars.[ Sales rose nine percent in 2006 while the car]",
497
+ "prefix":" figure yet to be realised by car manufacturers.\n\n",
498
+ "exact":"The Cycling Promotion Fund (CPF) spokesman Ian Christie said Australians were increasingly using bicycles as an alternative to cars.",
499
+ "suffix":" Sales rose nine percent in 2006 while the car",
500
+ "offset":392,
501
+ "length":132
502
+ }
503
+ ]
504
+ },
505
+ "http://d.opencalais.com/genericHasher-1/21431161-7b9f-34c0-9417-9f9b72ed8a70":{
506
+ "_type":"GenericRelations",
507
+ "_typeGroup":"relations",
508
+ "verb":"say",
509
+ "relationsubject":"http://d.opencalais.com/pershash-1/3bcf2655-ff2a-3a80-8de4-558b9626ad21",
510
+ "relationobject":"people were looking to cut their fuel costs and improve their fitness",
511
+ "instances":[
512
+ {
513
+ "detection":"[percent in 2006 while the car market stalled. ]Mr Christie said people were looking to cut their fuel costs and improve their fitness.[\n\nMr Christie, a native of Hobart, Tasmania said]",
514
+ "prefix":"percent in 2006 while the car market stalled. ",
515
+ "exact":"Mr Christie said people were looking to cut their fuel costs and improve their fitness.",
516
+ "suffix":"\n\nMr Christie, a native of Hobart, Tasmania said",
517
+ "offset":587,
518
+ "length":87
519
+ }
520
+ ]
521
+ },
522
+ "http://d.opencalais.com/genericHasher-1/03ebb542-58cd-346f-8cf5-c69cfef1d446":{
523
+ "_type":"GenericRelations",
524
+ "_typeGroup":"relations",
525
+ "verb":"stall",
526
+ "relationsubject":"http://d.opencalais.com/genericHasher-1/3979e581-0823-3e84-9257-1ca36db4665e",
527
+ "instances":[
528
+ {
529
+ "detection":"[to cars. Sales rose nine percent in 2006 while ]the car market stalled[. Mr Christie said people were looking to cut]",
530
+ "prefix":"to cars. Sales rose nine percent in 2006 while ",
531
+ "exact":"the car market stalled",
532
+ "suffix":". Mr Christie said people were looking to cut",
533
+ "offset":563,
534
+ "length":22
535
+ }
536
+ ]
537
+ }
538
+ }