aylien_text_api 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/README.md +12 -10
  4. data/aylien_text_api.gemspec +3 -3
  5. data/lib/aylien_text_api/client.rb +30 -93
  6. data/lib/aylien_text_api/configuration.rb +2 -4
  7. data/lib/aylien_text_api/version.rb +1 -1
  8. data/spec/fixtures/aylien_text_api/client/{microformats_with_invalid_client.yml → elsa_with_invalid_client.yml} +10 -8
  9. data/spec/fixtures/aylien_text_api/client/{related_with_invalid_params.yml → elsa_with_invalid_params.yml} +15 -24
  10. data/spec/fixtures/aylien_text_api/client/elsa_with_text.yml +98 -0
  11. data/spec/fixtures/aylien_text_api/client/{related_with_unauthenticated_client.yml → elsa_with_unauthenticated_client.yml} +10 -8
  12. data/spec/fixtures/aylien_text_api/client/elsa_with_valid_url.yml +47 -0
  13. data/spec/fixtures/aylien_text_api/client/elsa_with_value_as_text.yml +92 -0
  14. data/spec/fixtures/aylien_text_api/client/elsa_with_value_as_valid_url.yml +53 -0
  15. data/spec/lib/aylien_text_api/client_spec.rb +1 -3
  16. data/spec/lib/aylien_text_api/elsa.rb +81 -0
  17. metadata +14 -152
  18. data/spec/fixtures/aylien_text_api/client/microformats_with_invalid_params.yml +0 -62
  19. data/spec/fixtures/aylien_text_api/client/microformats_with_unauthenticated_client.yml +0 -42
  20. data/spec/fixtures/aylien_text_api/client/microformats_with_valid_url.yml +0 -84
  21. data/spec/fixtures/aylien_text_api/client/microformats_with_value_as_valid_url.yml +0 -84
  22. data/spec/fixtures/aylien_text_api/client/related_with_invalid_client.yml +0 -38
  23. data/spec/fixtures/aylien_text_api/client/related_with_phrase.yml +0 -112
  24. data/spec/fixtures/aylien_text_api/client/related_with_value_as_phrase.yml +0 -112
  25. data/spec/fixtures/aylien_text_api/client/related_with_value_as_valid_url.yml +0 -62
  26. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_invalid_client.yml +0 -38
  27. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_invalid_params.yml +0 -57
  28. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_text.yml +0 -53
  29. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_unauthenticated_client.yml +0 -42
  30. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_valid_url.yml +0 -97
  31. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_value_as_text.yml +0 -57
  32. data/spec/fixtures/aylien_text_api/client/unsupervised_classify_with_value_as_valid_url.yml +0 -97
  33. data/spec/lib/aylien_text_api/microformats.rb +0 -66
  34. data/spec/lib/aylien_text_api/related.rb +0 -80
  35. data/spec/lib/aylien_text_api/unsupervised_classify.rb +0 -87
@@ -1,62 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/related
6
- body:
7
- encoding: US-ASCII
8
- string: url=http%3A%2F%2Fwww.bbc.com%2Fsport%2F0%2Ffootball%2F25912393
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - "<PASSWORD>"
20
- X-Aylien-Textapi-Application-Key:
21
- - "<PASSWORD>"
22
- response:
23
- status:
24
- code: 400
25
- message: Bad Request
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:44:43 GMT
31
- Content-Type:
32
- - application/json;charset=UTF-8
33
- Content-Length:
34
- - '360'
35
- Connection:
36
- - keep-alive
37
- X-Ratelimit-Limit:
38
- - '207000'
39
- X-Ratelimit-Remaining:
40
- - '173638'
41
- X-Ratelimit-Reset:
42
- - '1461888000'
43
- body:
44
- encoding: UTF-8
45
- string: |-
46
- {
47
- "error": "requirement failed: Form field 'phrase' Required",
48
- "errors": [{
49
- "reason": "required",
50
- "message": "Form field 'phrase' Required",
51
- "locationType": "parameter",
52
- "location": "phrase"
53
- }, {
54
- "reason": "required",
55
- "message": "Query parameter 'phrase' Required",
56
- "locationType": "parameter",
57
- "location": "phrase"
58
- }]
59
- }
60
- http_version:
61
- recorded_at: Thu, 28 Apr 2016 10:44:43 GMT
62
- recorded_with: VCR 2.9.3
@@ -1,38 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify/unsupervised
6
- body:
7
- encoding: US-ASCII
8
- string: text=CCTV+footage+shows+the+moment+a+suicide+car+bomber+detonates%0A++++++a+device+in+Beirut+on+Tuesday.+The+incident+took+place+in+an+area%0A++++++of+support+for+Hezbollah+and+left+four+people+dead+with+many+more+wounded.%0A++++++A+group+calling+itself+the+al-Nusra+Front+in+Lebanon+has+claimed%0A++++++responsibility+for+the+attack+saying+it+was+in+retaliation+for%0A++++++Hezbollah%27s+military+support+of+president+Bashar+al-Assad%27s+forces+in+Syria&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- response:
19
- status:
20
- code: 403
21
- message: Forbidden
22
- headers:
23
- Server:
24
- - openresty/1.9.3.2
25
- Date:
26
- - Thu, 28 Apr 2016 10:37:09 GMT
27
- Content-Type:
28
- - text/plain; charset=us-ascii
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- body:
34
- encoding: UTF-8
35
- string: Authentication parameters missing
36
- http_version:
37
- recorded_at: Thu, 28 Apr 2016 10:37:09 GMT
38
- recorded_with: VCR 2.9.3
@@ -1,57 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify/unsupervised
6
- body:
7
- encoding: US-ASCII
8
- string: wrong_param=CCTV+footage+shows+the+moment+a+suicide+car+bomber+detonates%0A++++++a+device+in+Beirut+on+Tuesday.+The+incident+took+place+in+an+area%0A++++++of+support+for+Hezbollah+and+left+four+people+dead+with+many+more+wounded.%0A++++++A+group+calling+itself+the+al-Nusra+Front+in+Lebanon+has+claimed%0A++++++responsibility+for+the+attack+saying+it+was+in+retaliation+for%0A++++++Hezbollah%27s+military+support+of+president+Bashar+al-Assad%27s+forces+in+Syria&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - "<PASSWORD>"
20
- X-Aylien-Textapi-Application-Key:
21
- - "<PASSWORD>"
22
- response:
23
- status:
24
- code: 400
25
- message: Bad Request
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:37:07 GMT
31
- Content-Type:
32
- - application/json;charset=UTF-8
33
- Content-Length:
34
- - '221'
35
- Connection:
36
- - keep-alive
37
- X-Ratelimit-Limit:
38
- - '207000'
39
- X-Ratelimit-Remaining:
40
- - '174018'
41
- X-Ratelimit-Reset:
42
- - '1461888000'
43
- body:
44
- encoding: UTF-8
45
- string: |-
46
- {
47
- "error": "requirement failed: Either text or url is required.",
48
- "errors": [{
49
- "reason": "required",
50
- "message": "Either text or url is required.",
51
- "locationType": "parameter",
52
- "location": "text"
53
- }]
54
- }
55
- http_version:
56
- recorded_at: Thu, 28 Apr 2016 10:37:08 GMT
57
- recorded_with: VCR 2.9.3
@@ -1,53 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify/unsupervised
6
- body:
7
- encoding: US-ASCII
8
- string: text=CCTV+footage+shows+the+moment+a+suicide+car+bomber+detonates%0A++++++a+device+in+Beirut+on+Tuesday.+The+incident+took+place+in+an+area%0A++++++of+support+for+Hezbollah+and+left+four+people+dead+with+many+more+wounded.%0A++++++A+group+calling+itself+the+al-Nusra+Front+in+Lebanon+has+claimed%0A++++++responsibility+for+the+attack+saying+it+was+in+retaliation+for%0A++++++Hezbollah%27s+military+support+of+president+Bashar+al-Assad%27s+forces+in+Syria&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - "<PASSWORD>"
20
- X-Aylien-Textapi-Application-Key:
21
- - "<PASSWORD>"
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:37:13 GMT
31
- Content-Type:
32
- - application/json;charset=UTF-8
33
- Content-Length:
34
- - '561'
35
- Connection:
36
- - keep-alive
37
- X-Ratelimit-Limit:
38
- - '207000'
39
- X-Ratelimit-Remaining:
40
- - '174017'
41
- X-Ratelimit-Reset:
42
- - '1461888000'
43
- body:
44
- encoding: UTF-8
45
- string: '{"text":"CCTV footage shows the moment a suicide car bomber detonates\n a
46
- device in Beirut on Tuesday. The incident took place in an area\n of
47
- support for Hezbollah and left four people dead with many more wounded.\n A
48
- group calling itself the al-Nusra Front in Lebanon has claimed\n responsibility
49
- for the attack saying it was in retaliation for\n Hezbollah''s military
50
- support of president Bashar al-Assad''s forces in Syria","classes":[{"label":"president","score":0.024},{"label":"travel","score":0.0},{"label":"voyage","score":0.0}]}'
51
- http_version:
52
- recorded_at: Thu, 28 Apr 2016 10:37:13 GMT
53
- recorded_with: VCR 2.9.3
@@ -1,42 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify/unsupervised
6
- body:
7
- encoding: US-ASCII
8
- string: text=CCTV+footage+shows+the+moment+a+suicide+car+bomber+detonates%0A++++++a+device+in+Beirut+on+Tuesday.+The+incident+took+place+in+an+area%0A++++++of+support+for+Hezbollah+and+left+four+people+dead+with+many+more+wounded.%0A++++++A+group+calling+itself+the+al-Nusra+Front+in+Lebanon+has+claimed%0A++++++responsibility+for+the+attack+saying+it+was+in+retaliation+for%0A++++++Hezbollah%27s+military+support+of+president+Bashar+al-Assad%27s+forces+in+Syria&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - random_string
20
- X-Aylien-Textapi-Application-Key:
21
- - random_string
22
- response:
23
- status:
24
- code: 403
25
- message: Forbidden
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:37:13 GMT
31
- Content-Type:
32
- - text/plain; charset=us-ascii
33
- Transfer-Encoding:
34
- - chunked
35
- Connection:
36
- - keep-alive
37
- body:
38
- encoding: UTF-8
39
- string: Authentication failed
40
- http_version:
41
- recorded_at: Thu, 28 Apr 2016 10:37:13 GMT
42
- recorded_with: VCR 2.9.3
@@ -1,97 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify/unsupervised
6
- body:
7
- encoding: US-ASCII
8
- string: url=http%3A%2F%2Ftechcrunch.com%2F2014%2F10%2F20%2Fthe-super-slim-kindle-voyage-is-a-great-travel-companion%2F&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - "<PASSWORD>"
20
- X-Aylien-Textapi-Application-Key:
21
- - "<PASSWORD>"
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:37:18 GMT
31
- Content-Type:
32
- - application/json;charset=UTF-8
33
- Content-Length:
34
- - '2201'
35
- Connection:
36
- - keep-alive
37
- X-Ratelimit-Limit:
38
- - '207000'
39
- X-Ratelimit-Remaining:
40
- - '174004'
41
- X-Ratelimit-Reset:
42
- - '1461888000'
43
- body:
44
- encoding: ASCII-8BIT
45
- string: !binary |-
46
- eyJ0ZXh0IjoiSW4gMTkzNSwgU2lyIEFsbGVuIExhbmUgYW5kIFYuIEsuIEty
47
- aXNobmEgTWVub24gZm91bmRlZCBQZW5ndWluIEJvb2tzLCBhIGNvbXBhbnkg
48
- ZGVkaWNhdGVkIHRvIHByb2R1Y2luZyBoaWdoLXF1YWxpdHksIHNtYWxsLWZv
49
- cm1hdCBwYXBlcmJhY2sgYm9va3MgZm9yIHRoZSB3b3JsZCBtYXJrZXQuIFRo
50
- ZXNlIHNtYWxsLCB3ZWxsLW1hZGUgbGl0dGxlIGJvb2tzIGludHJvZHVjZWQg
51
- c29tZSBhbWF6aW5nIGZpY3Rpb24sIHBoaWxvc29waHksIGNsYXNzaWNhbCB0
52
- aG91Z2h0IGFuZCBzcGlyaXR1YWxpc20gdG8gYSBodW5ncnkgYXVkaWVuY2Us
53
- IGFuZCB0aGUgbG93IHByaWNlIG1hZGUgaXQgZWFzeSB0byBidWlsZCBhIGxp
54
- YnJhcnkgb2YgYW1hemluZyB0aXRsZXMgdGhhdCBjb3VsZCBmaXQgaW50byBh
55
- IG1pbGsgY3JhdGUuIFBlbmd1aW4sIGl0IGNhbiBiZSBhcmd1ZWQ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IGludG8gYSBsaXR0bGUgc3RhbmQgZm9yIGhhbmRzLWZy
89
- ZWUgcmVhZGluZy5cclxuXHJcblNvIGhvdyBkb2VzIGl0IHdvcms/IEluIHNo
90
- b3J0LCBJIGxvdmUgZS1pbmsgZGV2aWNlcywgYW5kIHRoZSBWb3lhZ2UgaXMg
91
- dGhlIGJlc3Qgb2YgdGhlIiwiY2xhc3NlcyI6W3sibGFiZWwiOiJ2b3lhZ2Ui
92
- LCJzY29yZSI6MC4wMTg2MzM1NDAzNzI2NzA4MDh9LHsibGFiZWwiOiJ0cmF2
93
- ZWwiLCJzY29yZSI6MC4wMDUxNzU5ODM0MzY4NTMwMDJ9LHsibGFiZWwiOiJw
94
- cmVzaWRlbnQiLCJzY29yZSI6MC4wMDIwNzAzOTMzNzQ3NDEyMDF9XX0=
95
- http_version:
96
- recorded_at: Thu, 28 Apr 2016 10:37:18 GMT
97
- recorded_with: VCR 2.9.3
@@ -1,57 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify
6
- body:
7
- encoding: US-ASCII
8
- string: text=CCTV+footage+shows+the+moment+a+suicide+car+bomber+detonates%0A++++++a+device+in+Beirut+on+Tuesday.+The+incident+took+place+in+an+area%0A++++++of+support+for+Hezbollah+and+left+four+people+dead+with+many+more+wounded.%0A++++++A+group+calling+itself+the+al-Nusra+Front+in+Lebanon+has+claimed%0A++++++responsibility+for+the+attack+saying+it+was+in+retaliation+for%0A++++++Hezbollah%27s+military+support+of+president+Bashar+al-Assad%27s+forces+in+Syria&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - "<PASSWORD>"
20
- X-Aylien-Textapi-Application-Key:
21
- - "<PASSWORD>"
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:37:07 GMT
31
- Content-Type:
32
- - application/json;charset=UTF-8
33
- Content-Length:
34
- - '605'
35
- Connection:
36
- - keep-alive
37
- X-Ratelimit-Limit:
38
- - '207000'
39
- X-Ratelimit-Remaining:
40
- - '174019'
41
- X-Ratelimit-Reset:
42
- - '1461888000'
43
- body:
44
- encoding: UTF-8
45
- string: |-
46
- {
47
- "text": "CCTV footage shows the moment a suicide car bomber detonates\n a device in Beirut on Tuesday. The incident took place in an area\n of support for Hezbollah and left four people dead with many more wounded.\n A group calling itself the al-Nusra Front in Lebanon has claimed\n responsibility for the attack saying it was in retaliation for\n Hezbollah's military support of president Bashar al-Assad's forces in Syria",
48
- "language": "en",
49
- "categories": [{
50
- "label": "defence - biological and chemical weapons",
51
- "code": "11001007",
52
- "confidence": 1.0
53
- }]
54
- }
55
- http_version:
56
- recorded_at: Thu, 28 Apr 2016 10:37:07 GMT
57
- recorded_with: VCR 2.9.3
@@ -1,97 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://api.aylien.com/api/v1/classify/unsupervised
6
- body:
7
- encoding: US-ASCII
8
- string: url=http%3A%2F%2Ftechcrunch.com%2F2014%2F10%2F20%2Fthe-super-slim-kindle-voyage-is-a-great-travel-companion%2F&class=voyage&class=travel&class=president
9
- headers:
10
- Accept-Encoding:
11
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- Accept:
13
- - "*/*"
14
- User-Agent:
15
- - Aylien Text API Ruby Gem 0.6.0
16
- Content-Type:
17
- - application/x-www-form-urlencoded
18
- X-Aylien-Textapi-Application-Id:
19
- - "<PASSWORD>"
20
- X-Aylien-Textapi-Application-Key:
21
- - "<PASSWORD>"
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Server:
28
- - openresty/1.9.3.2
29
- Date:
30
- - Thu, 28 Apr 2016 10:37:22 GMT
31
- Content-Type:
32
- - application/json;charset=UTF-8
33
- Content-Length:
34
- - '2201'
35
- Connection:
36
- - keep-alive
37
- X-Ratelimit-Limit:
38
- - '207000'
39
- X-Ratelimit-Remaining:
40
- - '174003'
41
- X-Ratelimit-Reset:
42
- - '1461888000'
43
- body:
44
- encoding: ASCII-8BIT
45
- string: !binary |-
46
- eyJ0ZXh0IjoiSW4gMTkzNSwgU2lyIEFsbGVuIExhbmUgYW5kIFYuIEsuIEty
47
- aXNobmEgTWVub24gZm91bmRlZCBQZW5ndWluIEJvb2tzLCBhIGNvbXBhbnkg
48
- ZGVkaWNhdGVkIHRvIHByb2R1Y2luZyBoaWdoLXF1YWxpdHksIHNtYWxsLWZv
49
- cm1hdCBwYXBlcmJhY2sgYm9va3MgZm9yIHRoZSB3b3JsZCBtYXJrZXQuIFRo
50
- ZXNlIHNtYWxsLCB3ZWxsLW1hZGUgbGl0dGxlIGJvb2tzIGludHJvZHVjZWQg
51
- c29tZSBhbWF6aW5nIGZpY3Rpb24sIHBoaWxvc29waHksIGNsYXNzaWNhbCB0
52
- aG91Z2h0IGFuZCBzcGlyaXR1YWxpc20gdG8gYSBodW5ncnkgYXVkaWVuY2Us
53
- IGFuZCB0aGUgbG93IHByaWNlIG1hZGUgaXQgZWFzeSB0byBidWlsZCBhIGxp
54
- YnJhcnkgb2YgYW1hemluZyB0aXRsZXMgdGhhdCBjb3VsZCBmaXQgaW50byBh
55
- IG1pbGsgY3JhdGUuIFBlbmd1aW4sIGl0IGNhbiBiZSBhcmd1ZWQsIGJyb3Vn
56
- aHQgYWJvdXQgYW4gaW50ZWxsZWN0dWFsIHNlYSBjaGFuZ2UsIGJyaW5naW5n
57
- IHVzIGJvdGggdGhlIHBvc3Qtd2FyIHdyaXRlcnMgb2Ygbm90ZSBhbmQsIGlu
58
- IGFub3RoZXIgZGlyZWN0aW9uLCB0aGUgQmVhdHMgYW5kIHRoZSBzcGlyaXR1
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