wlapi 0.8.6 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.yardopts +1 -1
- data/CHANGELOG.md +2 -15
- data/README.rdoc +47 -9
- data/lib/wlapi/api.rb +45 -50
- data/lib/wlapi/version.rb +1 -1
- data/test/fixtures/vcr_cassettes/baseform.yml +221 -0
- data/test/fixtures/vcr_cassettes/cooccurrences.yml +221 -0
- data/test/fixtures/vcr_cassettes/cooccurrences_all.yml +223 -0
- data/test/fixtures/vcr_cassettes/crossword.yml +223 -0
- data/test/fixtures/vcr_cassettes/domain.yml +221 -0
- data/test/fixtures/vcr_cassettes/experimental_synonyms.yml +221 -0
- data/test/fixtures/vcr_cassettes/frequencies.yml +221 -0
- data/test/fixtures/vcr_cassettes/intersection.yml +34 -0
- data/test/fixtures/vcr_cassettes/left_collocation_finder.yml +221 -0
- data/test/fixtures/vcr_cassettes/left_neighbours.yml +221 -0
- data/test/fixtures/vcr_cassettes/right_collocation_finder.yml +221 -0
- data/test/fixtures/vcr_cassettes/right_neighbours.yml +221 -0
- data/test/fixtures/vcr_cassettes/sentences.yml +221 -0
- data/test/fixtures/vcr_cassettes/similarity.yml +221 -0
- data/test/fixtures/vcr_cassettes/synonyms.yml +221 -0
- data/test/fixtures/vcr_cassettes/thesaurus.yml +221 -0
- data/test/fixtures/vcr_cassettes/vcr_test.yml +221 -0
- data/test/fixtures/vcr_cassettes/wordforms.yml +221 -0
- data/test/remote_test_functional.rb +6 -1
- data/test/remote_vcr_test.rb +32 -0
- data/test/test_helper.rb +12 -1
- metadata +121 -76
- metadata.gz.sig +0 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'yaml'
|
3
|
+
require 'test/unit'
|
4
|
+
require 'test_helper.rb'
|
5
|
+
require 'vcr'
|
6
|
+
require 'wlapi'
|
7
|
+
|
8
|
+
class TestApi < Test::Unit::TestCase
|
9
|
+
include TestHelper
|
10
|
+
|
11
|
+
credentials = YAML.load_file('SENSITIVE')['credentials']
|
12
|
+
USER = credentials['user']
|
13
|
+
PASS = credentials['pass']
|
14
|
+
|
15
|
+
def setup
|
16
|
+
@api = WLAPI::API.new(USER, PASS)
|
17
|
+
end
|
18
|
+
|
19
|
+
def teardown
|
20
|
+
end
|
21
|
+
|
22
|
+
# VCR Test
|
23
|
+
def test_test
|
24
|
+
expectation = ["Buch",
|
25
|
+
"Bücher",
|
26
|
+
"Büchern",
|
27
|
+
"Buches",
|
28
|
+
"Buchs",
|
29
|
+
"Bucher"]
|
30
|
+
execute(expectation, :wordforms, 'Buch')
|
31
|
+
end
|
32
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,8 +1,19 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
|
3
|
+
VCR.configure do |c|
|
4
|
+
c.cassette_library_dir = 'test/fixtures/vcr_cassettes'
|
5
|
+
c.hook_into :webmock
|
6
|
+
end
|
7
|
+
|
1
8
|
module TestHelper
|
9
|
+
|
2
10
|
def execute(expectation, method, *args)
|
3
11
|
begin
|
4
|
-
result =
|
12
|
+
result = VCR.use_cassette(method) do
|
13
|
+
@api.send(method, *args)
|
14
|
+
end
|
5
15
|
rescue => error
|
16
|
+
# Servers are unreliable, sometimes we get this reboot message.
|
6
17
|
if error.message =~ /(Server shutdown in progress)|(404)/i
|
7
18
|
result = expectation
|
8
19
|
warn(error.message)
|
metadata
CHANGED
@@ -1,75 +1,80 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: wlapi
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Andrei Beliankou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-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lNGsDpOMRy51ZEj7ZI9Mh4gjzEP
|
27
|
+
A4S15oPoF6GtT61VoLr+b+LMSw1zc/0SnahICHAie/hjCt6rHAhcbjWoGxT8lvyz
|
28
|
+
2O//v2roSxONJEcuRseFLbcCrP/hJ2mDL8YG4RUlTD5stW69Yl+PkdhWZyQmTcZY
|
29
|
+
DSM2fKAAoAeRQgdhDRp+eH21zNn2L3RiOruXD9X2K32YWx/B6cb/WEbpk1rR7lmf
|
30
|
+
bHwRbA76MM2XQ5ub0A9H0JpLVgKRf0RfXFiP6JIQOrPk68/4pRuglI1taZNs6bVv
|
31
|
+
LLASI3ygefQ=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2015-06-26 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
15
36
|
name: savon
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
version: "2.1"
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '2.1'
|
22
42
|
type: :runtime
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: rdoc
|
26
|
-
prerelease: false
|
27
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
28
|
-
requirements:
|
29
|
-
- - ">="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 3.9.1
|
32
|
-
type: :development
|
33
|
-
version_requirements: *id002
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: bundler
|
36
|
-
prerelease: false
|
37
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- &id004
|
40
|
-
- ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: "0"
|
43
|
-
type: :development
|
44
|
-
version_requirements: *id003
|
45
|
-
- !ruby/object:Gem::Dependency
|
46
|
-
name: yard
|
47
43
|
prerelease: false
|
48
|
-
|
49
|
-
requirements:
|
50
|
-
-
|
51
|
-
|
52
|
-
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.1'
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: nokogiri
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.6'
|
56
|
+
type: :runtime
|
55
57
|
prerelease: false
|
56
|
-
|
57
|
-
requirements:
|
58
|
-
-
|
59
|
-
|
60
|
-
|
61
|
-
description: WLAPI is a programmatic API for web services
|
62
|
-
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.6'
|
63
|
+
description: WLAPI is a programmatic API for web services providedby the project Wortschatz,
|
64
|
+
University of Leipzig. Theseservices are a great source of linguistic knowledgefor
|
65
|
+
morphological, syntactic and semantic analysisof German both for traditional and
|
66
|
+
ComputationalLinguistics (CL). Use this API to gain data on wordfrequencies, left
|
67
|
+
and right neighbours, collocations andsemantic similarity. Check it out if you are
|
68
|
+
interested inNatural Language Processing (NLP) and Human LanguageTechnology (HLT).
|
69
|
+
email: arbox@yandex.ru
|
63
70
|
executables: []
|
64
|
-
|
65
71
|
extensions: []
|
66
|
-
|
67
|
-
extra_rdoc_files:
|
72
|
+
extra_rdoc_files:
|
68
73
|
- README.rdoc
|
69
74
|
- LICENSE.rdoc
|
70
75
|
- CHANGELOG.md
|
71
|
-
files:
|
72
|
-
- .yardopts
|
76
|
+
files:
|
77
|
+
- ".yardopts"
|
73
78
|
- CHANGELOG.md
|
74
79
|
- LICENSE.rdoc
|
75
80
|
- README.rdoc
|
@@ -78,38 +83,78 @@ files:
|
|
78
83
|
- lib/wlapi/error.rb
|
79
84
|
- lib/wlapi/version.rb
|
80
85
|
- test/data/soap_request.txt
|
86
|
+
- test/fixtures/vcr_cassettes/baseform.yml
|
87
|
+
- test/fixtures/vcr_cassettes/cooccurrences.yml
|
88
|
+
- test/fixtures/vcr_cassettes/cooccurrences_all.yml
|
89
|
+
- test/fixtures/vcr_cassettes/crossword.yml
|
90
|
+
- test/fixtures/vcr_cassettes/domain.yml
|
91
|
+
- test/fixtures/vcr_cassettes/experimental_synonyms.yml
|
92
|
+
- test/fixtures/vcr_cassettes/frequencies.yml
|
93
|
+
- test/fixtures/vcr_cassettes/intersection.yml
|
94
|
+
- test/fixtures/vcr_cassettes/left_collocation_finder.yml
|
95
|
+
- test/fixtures/vcr_cassettes/left_neighbours.yml
|
96
|
+
- test/fixtures/vcr_cassettes/right_collocation_finder.yml
|
97
|
+
- test/fixtures/vcr_cassettes/right_neighbours.yml
|
98
|
+
- test/fixtures/vcr_cassettes/sentences.yml
|
99
|
+
- test/fixtures/vcr_cassettes/similarity.yml
|
100
|
+
- test/fixtures/vcr_cassettes/synonyms.yml
|
101
|
+
- test/fixtures/vcr_cassettes/thesaurus.yml
|
102
|
+
- test/fixtures/vcr_cassettes/vcr_test.yml
|
103
|
+
- test/fixtures/vcr_cassettes/wordforms.yml
|
81
104
|
- test/local_test_interface.rb
|
82
105
|
- test/remote_test_functional.rb
|
106
|
+
- test/remote_vcr_test.rb
|
83
107
|
- test/test_helper.rb
|
84
108
|
homepage: http://bu.chsta.be/projects/wlapi/
|
85
|
-
licenses:
|
86
|
-
|
109
|
+
licenses:
|
110
|
+
- MIT
|
87
111
|
metadata: {}
|
88
|
-
|
89
112
|
post_install_message:
|
90
|
-
rdoc_options:
|
91
|
-
- -m
|
113
|
+
rdoc_options:
|
114
|
+
- "-m"
|
92
115
|
- README.rdoc
|
93
|
-
require_paths:
|
116
|
+
require_paths:
|
94
117
|
- lib
|
95
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 1.9.3
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
97
125
|
- - ">="
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version:
|
100
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- *id004
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
103
128
|
requirements: []
|
104
|
-
|
105
129
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.2.2
|
107
131
|
signing_key:
|
108
132
|
specification_version: 4
|
109
|
-
summary: WLAPI is a programmatic API for web services provided by
|
110
|
-
|
133
|
+
summary: WLAPI is a programmatic API for web services provided by theproject Wortschatz,
|
134
|
+
University of Leipzig. Use differentlinguistic services such as synonym and collocation
|
135
|
+
search.
|
136
|
+
test_files:
|
111
137
|
- test/data/soap_request.txt
|
138
|
+
- test/fixtures/vcr_cassettes/baseform.yml
|
139
|
+
- test/fixtures/vcr_cassettes/cooccurrences.yml
|
140
|
+
- test/fixtures/vcr_cassettes/cooccurrences_all.yml
|
141
|
+
- test/fixtures/vcr_cassettes/crossword.yml
|
142
|
+
- test/fixtures/vcr_cassettes/domain.yml
|
143
|
+
- test/fixtures/vcr_cassettes/experimental_synonyms.yml
|
144
|
+
- test/fixtures/vcr_cassettes/frequencies.yml
|
145
|
+
- test/fixtures/vcr_cassettes/intersection.yml
|
146
|
+
- test/fixtures/vcr_cassettes/left_collocation_finder.yml
|
147
|
+
- test/fixtures/vcr_cassettes/left_neighbours.yml
|
148
|
+
- test/fixtures/vcr_cassettes/right_collocation_finder.yml
|
149
|
+
- test/fixtures/vcr_cassettes/right_neighbours.yml
|
150
|
+
- test/fixtures/vcr_cassettes/sentences.yml
|
151
|
+
- test/fixtures/vcr_cassettes/similarity.yml
|
152
|
+
- test/fixtures/vcr_cassettes/synonyms.yml
|
153
|
+
- test/fixtures/vcr_cassettes/thesaurus.yml
|
154
|
+
- test/fixtures/vcr_cassettes/vcr_test.yml
|
155
|
+
- test/fixtures/vcr_cassettes/wordforms.yml
|
112
156
|
- test/local_test_interface.rb
|
113
157
|
- test/remote_test_functional.rb
|
158
|
+
- test/remote_vcr_test.rb
|
114
159
|
- test/test_helper.rb
|
115
|
-
has_rdoc:
|
160
|
+
has_rdoc: yard
|
metadata.gz.sig
ADDED
Binary file
|