jm-calais 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -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[&lt;/Body&gt;&lt;/Document&gt;]</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>&lt;/Body&gt;&lt;/Document&gt;</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[&lt;/Body&gt;&lt;/Document&gt;]</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>&lt;/Body&gt;&lt;/Document&gt;</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&gt;&lt;Date&gt;2009-04-29&lt;/Date&gt;&lt;Body&gt;New blog post: ]Britney Spears[ - Britneys Ex-manager Gets Three-year]</c:detection>
84
+ <c:prefix>ument&gt;&lt;Date&gt;2009-04-29&lt;/Date&gt;&lt;Body&gt;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 ADDED
@@ -0,0 +1,16 @@
1
+ require 'rubygems'
2
+ require 'rspec'
3
+ require 'yaml'
4
+
5
+ require File.dirname(__FILE__) + '/../lib/calais'
6
+
7
+ FIXTURES_DIR = File.join File.dirname(__FILE__), %[fixtures]
8
+ SAMPLE_DOCUMENT = File.read(File.join(FIXTURES_DIR, %[bicycles_australia.xml]))
9
+ SAMPLE_RESPONSE = File.read(File.join(FIXTURES_DIR, %[bicycles_australia.response.rdf]))
10
+ SAMPLE_RESPONSE_WITH_NO_SCORE = File.read(File.join(FIXTURES_DIR, %[twitter_tweet_without_score.response.rdf]))
11
+ RESPONSE_WITH_EXCEPTION = File.read(File.join(FIXTURES_DIR, %[error.response.xml]))
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 ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jm-calais
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.13
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Abhay Kumar
9
+ - Jim Mayes
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-10-26 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: nokogiri
17
+ requirement: &70186414557020 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70186414557020
26
+ - !ruby/object:Gem::Dependency
27
+ name: json
28
+ requirement: &70186414552900 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *70186414552900
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ requirement: &70186414565340 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: 2.9.0
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *70186414565340
48
+ description: A Ruby interface to the Calais Web Service
49
+ email: info@opensynapse.net
50
+ executables: []
51
+ extensions: []
52
+ extra_rdoc_files: []
53
+ files:
54
+ - CHANGELOG.markdown
55
+ - Gemfile
56
+ - MIT-LICENSE
57
+ - README.markdown
58
+ - Rakefile
59
+ - lib/calais/client.rb
60
+ - lib/calais/error.rb
61
+ - lib/calais/response.rb
62
+ - lib/calais/version.rb
63
+ - lib/calais.rb
64
+ - spec/calais/client_spec.rb
65
+ - spec/calais/response_spec.rb
66
+ - spec/fixtures/bicycles_australia.response.json
67
+ - spec/fixtures/bicycles_australia.response.rdf
68
+ - spec/fixtures/bicycles_australia.xml
69
+ - spec/fixtures/calais.yml.sample
70
+ - spec/fixtures/error.response.xml
71
+ - spec/fixtures/slovenia_euro.xml
72
+ - spec/fixtures/twitter_tweet_without_score.response.rdf
73
+ - spec/helper.rb
74
+ homepage: http://github.com/abhay/calais
75
+ licenses: []
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 1.8.10
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: A Ruby interface to the Calais Web Service
98
+ test_files: []