calais 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +7 -0
- data/Gemfile +1 -9
- data/README.markdown +4 -3
- data/Rakefile +2 -63
- data/lib/calais.rb +1 -1
- data/lib/calais/client.rb +12 -12
- data/lib/calais/response.rb +7 -3
- data/lib/calais/version.rb +3 -0
- data/spec/calais/client_spec.rb +2 -2
- data/spec/calais/response_spec.rb +16 -4
- data/spec/fixtures/bicycles_australia.response.json +538 -0
- data/spec/fixtures/bicycles_australia.response.rdf +836 -0
- data/spec/fixtures/bicycles_australia.xml +18 -0
- data/spec/fixtures/calais.yml.sample +1 -0
- data/spec/fixtures/error.response.xml +1 -0
- data/spec/fixtures/slovenia_euro.xml +14 -0
- data/spec/fixtures/twitter_tweet_without_score.response.rdf +96 -0
- data/spec/helper.rb +5 -1
- metadata +29 -25
- data/VERSION.yml +0 -5
@@ -0,0 +1,18 @@
|
|
1
|
+
<document>
|
2
|
+
<id>57831</id>
|
3
|
+
<title>Record number of bicycles sold in Australia in 2006</title>
|
4
|
+
<date>January 4, 2007</date>
|
5
|
+
<body>
|
6
|
+
Bicycle 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.
|
7
|
+
|
8
|
+
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 market stalled. Mr Christie said people were looking to cut their fuel costs and improve their fitness.
|
9
|
+
|
10
|
+
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 bikes as their official company-supplied vehicle in place of the traditional company car," he said.
|
11
|
+
|
12
|
+
"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."
|
13
|
+
|
14
|
+
"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."
|
15
|
+
|
16
|
+
The CPF claims most commutes to work are less than 5 kilometres (3 miles) making bicycle travel a viable alternative.
|
17
|
+
|
18
|
+
</body></document>
|
@@ -0,0 +1 @@
|
|
1
|
+
key: asdlfkjasg08ahng2g08agds
|
@@ -0,0 +1 @@
|
|
1
|
+
<Error Method="ProcessText" calaisRequestID="b79e3bff-ddec-4c22-a3f4-f293c7691f7c" CreationDate="2009-04-27 06:06:32" CalaisVersion="R4.0_7.1.5038.5"><Exception>My Error Message</Exception></Error>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<document>
|
2
|
+
<id>57507</id>
|
3
|
+
<title>Slovenia adopts euro</title>
|
4
|
+
<date>January 1, 2007</date>
|
5
|
+
<body>
|
6
|
+
in Europe.]]
|
7
|
+
|
8
|
+
On January 1 2007, [[Slovenia]] officially joined the Eurozone and adopted the euro as its new official currency. At the same time, Slovenian euro coins, which were available as a "starter kit" from December 15, became legal tender everywhere in the Eurozone.
|
9
|
+
|
10
|
+
A period of dual circulation, when both the former currency, the tolar and the euro will be accepted, will only last until January 14. All banks are going to exchange tolars into euros at the official rate of 239.64 SIT per 1 EUR at no commission until March 1, 2007. After that date it will be possible to exchange tolar banknotes (unlimited) and coins (until 2016) only at the Bank of Slovenia.
|
11
|
+
|
12
|
+
Most ATMs already dispense euro banknotes with the rest to follow in the following days. Commercial banks automatically converted all tolar accounts into euros and online banking systems will be accessible to their users again on January 3. Even though January 1 and 2 are non-working days in Slovenia, many banks will be opened from 10:00 to 14:00 on both days, available only for one service: exchanging tolars to euros and larger euro banknotes into smaller units.
|
13
|
+
|
14
|
+
</body></document>
|
@@ -0,0 +1,96 @@
|
|
1
|
+
<!--Use of the Calais Web Service is governed by the Terms of Service located at http://www.opencalais.com. By using this service or the results of the service you agree to these terms of service.-->
|
2
|
+
<!--Relations: \n\nPerson: Britney Spears\nPosition: manager Gets Three-year Restraining Order http://tinyurl.com/c3an83 \nURL: http://tinyurl.com/c3an83-->
|
3
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:c="http://s.opencalais.com/1/pred/">
|
4
|
+
<rdf:Description c:calaisRequestID="3b38063c-3501-4616-a147-dc320524e4cd" c:id="http://id.opencalais.com/R-K97XNFMWlvNk3egqmtkQ" rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c">
|
5
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/DocInfo"/>
|
6
|
+
<c:document><![CDATA[<Document><Date>2009-04-29</Date><Body>New blog post: Britney Spears - Britneys Ex-manager Gets Three-year Restraining Order http://tinyurl.com/c3an83</Body></Document>]]></c:document>
|
7
|
+
<c:docTitle/>
|
8
|
+
<c:docDate>2009-04-29 00:00:00</c:docDate>
|
9
|
+
</rdf:Description>
|
10
|
+
<rdf:Description c:contentType="text/txt" c:emVer="UserVocabulariesIM" c:langIdVer="DefaultLangId" c:language="English" c:processingVer="CalaisJob01" c:submissionDate="2009-04-29 06:31:24.479" rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/meta">
|
11
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/DocInfoMeta"/>
|
12
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
13
|
+
<c:submitterCode>5f1011ef-16a9-ad05-71f7-2258f1fbe2dd</c:submitterCode>
|
14
|
+
<c:signature>digestalg-1|eh73JHhsWKBVyFFeemW2y8tLl9s=|Bifo1lubGloW3drezb2RF7jXHipJtxP4pZL9INI3HdRwFIKmbrkxqg==</c:signature>
|
15
|
+
</rdf:Description>
|
16
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/lid/DefaultLangId">
|
17
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/lid/DefaultLangId"/>
|
18
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
19
|
+
<c:lang rdf:resource="http://d.opencalais.com/lid/DefaultLangId/English"/>
|
20
|
+
</rdf:Description>
|
21
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/cat/1">
|
22
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/cat/DocCat"/>
|
23
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
24
|
+
<c:category rdf:resource="http://d.opencalais.com/cat/Calais/Other"/>
|
25
|
+
<c:classifierName>Calais</c:classifierName>
|
26
|
+
<c:categoryName>Other</c:categoryName>
|
27
|
+
</rdf:Description>
|
28
|
+
<rdf:Description rdf:about="http://d.opencalais.com/genericHasher-1/ac60b58e-e2a3-3517-9a58-fbd272891cc4">
|
29
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/em/e/Position"/>
|
30
|
+
<c:name>manager Gets Three-year Restraining Order http://tinyurl.com/c3an83 </c:name>
|
31
|
+
</rdf:Description>
|
32
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/Instance/1">
|
33
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/InstanceInfo"/>
|
34
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
35
|
+
<c:subject rdf:resource="http://d.opencalais.com/genericHasher-1/ac60b58e-e2a3-3517-9a58-fbd272891cc4"/>
|
36
|
+
<!--Position: manager Gets Three-year Restraining Order http://tinyurl.com/c3an83 ; -->
|
37
|
+
<c:detection>[blog post: Britney Spears - Britneys Ex-]manager Gets Three-year Restraining Order http://tinyurl.com/c3an83[</Body></Document>]</c:detection>
|
38
|
+
<c:prefix>blog post: Britney Spears - Britneys Ex-</c:prefix>
|
39
|
+
<c:exact>manager Gets Three-year Restraining Order http://tinyurl.com/c3an83</c:exact>
|
40
|
+
<c:suffix></Body></Document></c:suffix>
|
41
|
+
<c:offset>83</c:offset>
|
42
|
+
<c:length>67</c:length>
|
43
|
+
</rdf:Description>
|
44
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/Relevance/1">
|
45
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/RelevanceInfo"/>
|
46
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
47
|
+
<c:subject rdf:resource="http://d.opencalais.com/genericHasher-1/ac60b58e-e2a3-3517-9a58-fbd272891cc4"/>
|
48
|
+
<c:relevance>0.667</c:relevance>
|
49
|
+
</rdf:Description>
|
50
|
+
<rdf:Description rdf:about="http://d.opencalais.com/genericHasher-1/139fec3a-5961-37cf-8b4f-55077a04e58e">
|
51
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/em/e/URL"/>
|
52
|
+
<c:name>http://tinyurl.com/c3an83</c:name>
|
53
|
+
</rdf:Description>
|
54
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/Instance/2">
|
55
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/InstanceInfo"/>
|
56
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
57
|
+
<c:subject rdf:resource="http://d.opencalais.com/genericHasher-1/139fec3a-5961-37cf-8b4f-55077a04e58e"/>
|
58
|
+
<!--URL: http://tinyurl.com/c3an83; -->
|
59
|
+
<c:detection>[Ex-manager Gets Three-year Restraining Order ]http://tinyurl.com/c3an83[</Body></Document>]</c:detection>
|
60
|
+
<c:prefix>Ex-manager Gets Three-year Restraining Order </c:prefix>
|
61
|
+
<c:exact>http://tinyurl.com/c3an83</c:exact>
|
62
|
+
<c:suffix></Body></Document></c:suffix>
|
63
|
+
<c:offset>125</c:offset>
|
64
|
+
<c:length>25</c:length>
|
65
|
+
</rdf:Description>
|
66
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/Relevance/2">
|
67
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/RelevanceInfo"/>
|
68
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
69
|
+
<c:subject rdf:resource="http://d.opencalais.com/genericHasher-1/139fec3a-5961-37cf-8b4f-55077a04e58e"/>
|
70
|
+
<c:relevance>0.667</c:relevance>
|
71
|
+
</rdf:Description>
|
72
|
+
<rdf:Description rdf:about="http://d.opencalais.com/pershash-1/8145a3e3-6537-31d3-aa64-bba9cf8627e9">
|
73
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/em/e/Person"/>
|
74
|
+
<c:name>Britney Spears</c:name>
|
75
|
+
<c:persontype>entertainment</c:persontype>
|
76
|
+
<c:nationality>N/A</c:nationality>
|
77
|
+
</rdf:Description>
|
78
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/Instance/3">
|
79
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/InstanceInfo"/>
|
80
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
81
|
+
<c:subject rdf:resource="http://d.opencalais.com/pershash-1/8145a3e3-6537-31d3-aa64-bba9cf8627e9"/>
|
82
|
+
<!--Person: Britney Spears; -->
|
83
|
+
<c:detection>[ument><Date>2009-04-29</Date><Body>New blog post: ]Britney Spears[ - Britneys Ex-manager Gets Three-year]</c:detection>
|
84
|
+
<c:prefix>ument><Date>2009-04-29</Date><Body>New blog post: </c:prefix>
|
85
|
+
<c:exact>Britney Spears</c:exact>
|
86
|
+
<c:suffix> - Britneys Ex-manager Gets Three-year</c:suffix>
|
87
|
+
<c:offset>54</c:offset>
|
88
|
+
<c:length>14</c:length>
|
89
|
+
</rdf:Description>
|
90
|
+
<rdf:Description rdf:about="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c/Relevance/3">
|
91
|
+
<rdf:type rdf:resource="http://s.opencalais.com/1/type/sys/RelevanceInfo"/>
|
92
|
+
<c:docId rdf:resource="http://d.opencalais.com/dochash-1/01a2b473-4a92-3910-907c-0a6600ef6d4c"/>
|
93
|
+
<c:subject rdf:resource="http://d.opencalais.com/pershash-1/8145a3e3-6537-31d3-aa64-bba9cf8627e9"/>
|
94
|
+
<c:relevance>0.667</c:relevance>
|
95
|
+
</rdf:Description>
|
96
|
+
</rdf:RDF>
|
data/spec/helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
2
|
+
require 'rspec'
|
3
3
|
require 'yaml'
|
4
4
|
|
5
5
|
require File.dirname(__FILE__) + '/../lib/calais'
|
@@ -10,3 +10,7 @@ SAMPLE_RESPONSE = File.read(File.join(FIXTURES_DIR, %[bicycles_australia.respons
|
|
10
10
|
SAMPLE_RESPONSE_WITH_NO_SCORE = File.read(File.join(FIXTURES_DIR, %[twitter_tweet_without_score.response.rdf]))
|
11
11
|
RESPONSE_WITH_EXCEPTION = File.read(File.join(FIXTURES_DIR, %[error.response.xml]))
|
12
12
|
LICENSE_ID = YAML.load(File.read(File.join(FIXTURES_DIR, %[calais.yml])))['key']
|
13
|
+
|
14
|
+
RSpec.configure do |c|
|
15
|
+
c.treat_symbols_as_metadata_keys_with_true_values = true
|
16
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calais
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 12
|
10
|
+
version: 0.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Abhay Kumar
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-04-19 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: nokogiri
|
@@ -51,20 +50,20 @@ dependencies:
|
|
51
50
|
type: :runtime
|
52
51
|
version_requirements: *id002
|
53
52
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
53
|
+
name: rspec
|
55
54
|
prerelease: false
|
56
55
|
requirement: &id003 !ruby/object:Gem::Requirement
|
57
56
|
none: false
|
58
57
|
requirements:
|
59
58
|
- - ">="
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
60
|
+
hash: 43
|
62
61
|
segments:
|
62
|
+
- 2
|
63
|
+
- 9
|
63
64
|
- 0
|
64
|
-
|
65
|
-
|
66
|
-
version: 0.1.4
|
67
|
-
type: :runtime
|
65
|
+
version: 2.9.0
|
66
|
+
type: :development
|
68
67
|
version_requirements: *id003
|
69
68
|
description: A Ruby interface to the Calais Web Service
|
70
69
|
email: info@opensynapse.net
|
@@ -72,29 +71,35 @@ executables: []
|
|
72
71
|
|
73
72
|
extensions: []
|
74
73
|
|
75
|
-
extra_rdoc_files:
|
76
|
-
|
74
|
+
extra_rdoc_files: []
|
75
|
+
|
77
76
|
files:
|
78
77
|
- CHANGELOG.markdown
|
79
78
|
- Gemfile
|
80
79
|
- MIT-LICENSE
|
81
80
|
- README.markdown
|
82
81
|
- Rakefile
|
83
|
-
- VERSION.yml
|
84
|
-
- lib/calais.rb
|
85
82
|
- lib/calais/client.rb
|
86
83
|
- lib/calais/error.rb
|
87
84
|
- lib/calais/response.rb
|
85
|
+
- lib/calais/version.rb
|
86
|
+
- lib/calais.rb
|
88
87
|
- spec/calais/client_spec.rb
|
89
88
|
- spec/calais/response_spec.rb
|
89
|
+
- spec/fixtures/bicycles_australia.response.json
|
90
|
+
- spec/fixtures/bicycles_australia.response.rdf
|
91
|
+
- spec/fixtures/bicycles_australia.xml
|
92
|
+
- spec/fixtures/calais.yml.sample
|
93
|
+
- spec/fixtures/error.response.xml
|
94
|
+
- spec/fixtures/slovenia_euro.xml
|
95
|
+
- spec/fixtures/twitter_tweet_without_score.response.rdf
|
90
96
|
- spec/helper.rb
|
91
|
-
has_rdoc: true
|
92
97
|
homepage: http://github.com/abhay/calais
|
93
98
|
licenses: []
|
94
99
|
|
95
100
|
post_install_message:
|
96
|
-
rdoc_options:
|
97
|
-
|
101
|
+
rdoc_options: []
|
102
|
+
|
98
103
|
require_paths:
|
99
104
|
- lib
|
100
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -117,12 +122,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
122
|
version: "0"
|
118
123
|
requirements: []
|
119
124
|
|
120
|
-
rubyforge_project:
|
121
|
-
rubygems_version: 1.
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 1.8.19
|
122
127
|
signing_key:
|
123
128
|
specification_version: 3
|
124
129
|
summary: A Ruby interface to the Calais Web Service
|
125
|
-
test_files:
|
126
|
-
|
127
|
-
|
128
|
-
- spec/helper.rb
|
130
|
+
test_files: []
|
131
|
+
|
132
|
+
has_rdoc:
|