lexical_units 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lexical_units.gemspec +2 -2
- data/lib/lexical_units/version.rb +1 -1
- data/lib/lexical_units/words.rb +1 -1
- data/spec/lexical_units/words_spec.rb +13 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a580c1d8e7c8e7c49471c59ad7f2f58730e71570
|
4
|
+
data.tar.gz: c4f5f7f0e9702f3feedab6cfb94663b2bb510c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e930d842913965b4baa7fa7df71210da3df70c7d9e8700e46e8253b563e55659a5d0276f68daaa1b85459f5852241f6202a1c7537ea050bf02d291a7d688893
|
7
|
+
data.tar.gz: b6e5bc6caf55117d8072f88882c8e8815ada1dadf8cb7606e372c66b5e34becfcd264a22b89fba3fb92e87592d9e2103cccfd3f6e1cba3cfba04e84447dffbbf
|
data/lexical_units.gemspec
CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
21
|
-
spec.add_development_dependency 'rake', '
|
22
|
-
spec.add_development_dependency 'rspec', '~> 3.0
|
21
|
+
spec.add_development_dependency 'rake', '~> 0'
|
22
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
23
23
|
end
|
data/lib/lexical_units/words.rb
CHANGED
@@ -17,7 +17,7 @@ module LexicalUnits
|
|
17
17
|
[
|
18
18
|
'\,', '\:', '\;', '\.', '\?', '\!', '\/', '\|', '\~',
|
19
19
|
'\(', '\)', '\[', '\]', '\>', '\<', '\{', '\}',
|
20
|
-
"\¿", "\¡", '\=', '\"', "\»", "\«", '\@', '\#', '\+', '–', '—'
|
20
|
+
"\¿", "\¡", '\=', '\"', "\»", "\«", '\@', '\#', '\+', '–', '—', '„', '”'
|
21
21
|
].join
|
22
22
|
end
|
23
23
|
end
|
@@ -95,43 +95,49 @@ describe LexicalUnits do
|
|
95
95
|
end
|
96
96
|
|
97
97
|
it 'splits text with typewriter double quotes into words' do
|
98
|
-
text =
|
98
|
+
text = 'Lorem"ipsum dolor"sit amet'
|
99
99
|
|
100
100
|
expect(subject.words(text)).to eq(@array)
|
101
101
|
end
|
102
102
|
|
103
103
|
it 'split text with non-English quotation marks into words' do
|
104
|
-
text =
|
104
|
+
text = 'Lorem„ipsum”dolor„sit”amet'
|
105
|
+
|
106
|
+
expect(subject.words(text)).to eq(@array)
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'split text with down-up double quotation marks into words' do
|
110
|
+
text = 'Lorem»ipsum dolor«sit amet'
|
105
111
|
|
106
112
|
expect(subject.words(text)).to eq(@array)
|
107
113
|
end
|
108
114
|
|
109
115
|
it "split text with 'at sign' (@) into words" do
|
110
|
-
text =
|
116
|
+
text = 'Lorem@ipsum dolor sit amet'
|
111
117
|
|
112
118
|
expect(subject.words(text)).to eq(@array)
|
113
119
|
end
|
114
120
|
|
115
121
|
it "split text with 'number sign (#) into words" do
|
116
|
-
text =
|
122
|
+
text = 'Lorem ipsum#dolor sit amet'
|
117
123
|
|
118
124
|
expect(subject.words(text)).to eq(@array)
|
119
125
|
end
|
120
126
|
|
121
127
|
it 'split text with plus (+) into words' do
|
122
|
-
text =
|
128
|
+
text = 'Lorem+ipsum dolor+sit amet'
|
123
129
|
|
124
130
|
expect(subject.words(text)).to eq(@array)
|
125
131
|
end
|
126
132
|
|
127
133
|
it 'splite text with minus (–) into words' do
|
128
|
-
text =
|
134
|
+
text = 'Lorem ipsum–dolor sit amet'
|
129
135
|
|
130
136
|
expect(subject.words(text)).to eq(@array)
|
131
137
|
end
|
132
138
|
|
133
139
|
it 'splite text with long minus (—) into words' do
|
134
|
-
text =
|
140
|
+
text = 'Lorem—ipsum—dolor sit—amet'
|
135
141
|
|
136
142
|
expect(subject.words(text)).to eq(@array)
|
137
143
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lexical_units
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksander Malaszkiewicz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3.0
|
47
|
+
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3.0
|
54
|
+
version: '3.0'
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- info@fractalsoft.org
|